/*DATA CLEANING FOR THE BASELINE SURVEY, EDUCATE! RWANDA PROJECT

*--PURPOSE**
This file is used for data cleaning purposes. PIs suggested keeping both orginal and cleaned data sets.
This file provides all mistakes corrected/cleaned in student, HeadTeacher and Teacher data sets.
These cleaning includes but not limited to:
i) ordering variables and labelling properly
ii) edit �other� responses
iii) checking for outliers
iv) checking for skips patterns
v) checking for missings
*/

* I. CLEANING Teacher Surveys


clear all
set more off 
cap log close 
set maxvar 32500

*/
global raw_dir "[directory]"
global clean_dir "[directory]"

cd "$raw_dir"

use "Master_Teacher - Copy", clear


*DMAST schools

drop if school==145
drop if school==60



drop subscriberid	simid	devicephonenum

* SECTION 1. SCHOOL IDENTIFICATION

rename province province_100
rename district district_101
rename sector sector_102
rename cell cell_103
rename village village_104
rename school school_name_106

tostring school_code_107, replace
gen myid="0"+school_code_107
drop school_code_107
rename myid school_code_107
order school_code_107, after(school_name_106)
lab var school_code_107 "107_What is the school code?"

	*110 Phone numbers 
*drop phonepers_110_1 phonepers_110_2 phonepers_110_3
split phonepers_110, parse ("")
rename phonepers_1101 phonepers_110_1
rename phonepers_1102 phonepers_110_2
rename phonepers_1103 phonepers_110_3

order phonepers_110_1, after(phonepers_110)
order phonepers_110_2, after(phonepers_110_1)
order phonepers_110_3, after(phonepers_110_2)

destring phonepers_110_1 phonepers_110_2 phonepers_110_3, replace
#delimit ;
label define phonepers_110_1lab
1 "MTN"
2 "TIGO"
3 "AIRTEL";
#delimit cr

label val phonepers_110_1 phonepers_110_1lab

#delimit ;
label define phonepers_110_2lab
1 "MTN"
2 "TIGO"
3 "AIRTEL";
#delimit cr

label val phonepers_110_2 phonepers_110_2lab

#delimit ;
label define phonepers_110_3lab
1 "MTN"
2 "TIGO"
3 "AIRTEL";
#delimit cr

label val phonepers_110_3 phonepers_110_3lab 

*111 School Group
*The following schools are in Group 2 Control 
    
replace group_111=2 if key=="uuid:7b50a980-0652-4c88-8c21-8416f1d0ec38"
     
replace group_111=2 if key=="uuid:c520e356-5190-431e-8bf8-d10286108053"

replace group_111=2 if key=="uuid:a4797132-b679-417e-933e-48cf1ae2f080"
    
replace group_111=2 if key=="uuid:5c7fe1ea-4f67-41fc-be65-aacbca0dd474"
    
replace group_111=2 if key=="uuid:41701546-3455-4524-b8b1-8645a5e34345"

replace group_111=2 if key=="uuid:4ae71431-1c63-42e5-b31d-513bc11fb27d"
    
replace group_111=2 if key=="uuid:1d39600c-54bf-471f-be2b-034f559820fb"
     
replace group_111=2 if key=="uuid:ea226c92-d416-464e-8de5-d5d4f7e090f3"
    
replace group_111=2 if key=="uuid:6e24ba7a-7b91-4022-8db2-1c5418ec5ac5"
     
replace group_111=2 if key=="uuid:22cbf7e5-2410-4280-a3ae-1dba052753d8"
    
replace group_111=2 if key=="uuid:c63e401c-1eba-4ca4-850f-5de40befb0ef"     
    
replace group_111=2 if key=="uuid:97ec001b-1154-4355-bef7-0b460745bd7b"
     
replace group_111=2 if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"
     
replace group_111=2 if key=="uuid:4e82294b-bf9c-4af7-a9c3-be9d9b8982c1"
    
replace group_111=2 if key=="uuid:ecfab070-5ee5-4981-9ca6-1c1879f2b297"
       

*The following schools are in Group 1 Treatment  

replace group_111=1 if key=="uuid:10510f32-937e-43aa-86e9-6bde669b52c0"

replace group_111=1 if key=="uuid:52a8675c-6991-424a-8a7e-d1945be120b5"


	*113-
rename enumerator_id enumerator_id_113
rename enumerator_name enumerator_name_113
lab var enumerator_name_113 "113_Enumerator name"
rename supervisor_name supervisor_name_114
lab var supervisor_name_114 "114_Supervisor name"
rename dataentryclerk_name dataentryclerk_name_115
lab var dataentryclerk_name_115 "115_Data entry clerk name"


*The surveyed teacher from GS Hagini was S5 teacher. Then 117=0
replace teach_entr_117=0 if key=="uuid:93c9b2c9-81ff-456e-9283-e40640548d46"
replace teach_entr_117=0 if key=="uuid:e1d170d7-c34c-4783-83d3-eb38922d2019"
replace teach_entr_117=0 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace teach_entr_117=0 if key=="uuid:33bd67cb-c4c8-4992-9cdb-62f43924c928"
replace teach_entr_117=0 if key=="uuid:c5987cd3-2cfc-43c7-8f5d-25fce77396da"
replace teach_entr_117=0 if key=="uuid:fac78d8a-65bd-497f-a10b-77c24b5bab1c"


*The surveyed e-ship is no longer teaching S4 but S5 &S6.
replace stream_appl_118=1 if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace stream_118=" A B" if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace opt_appl_118=1 if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace opt_118="LEG, LFK" if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace stream_118="." if key=="uuid:045ffebc-2461-4198-8ca4-64bea9903a85"
replace opt_appl_118=1 if key=="uuid:8b612907-7f68-4731-84f7-7babb15e58cf"
replace stream_appl_118=1 if key=="uuid:890be4eb-d56d-4536-96c8-83708ba93b5b"
replace stream_118=" A B" if key=="uuid:890be4eb-d56d-4536-96c8-83708ba93b5b"
replace opt_appl_118=1 if key=="uuid:890be4eb-d56d-4536-96c8-83708ba93b5b"
replace opt_118="HEG, LKK" if key=="uuid:890be4eb-d56d-4536-96c8-83708ba93b5b"

split stream_118, parse ("")
gen stream_118_A=0
gen stream_118_B=0
forval i=1/3{
	replace stream_118_A=1 if stream_118`i'=="A"
	replace stream_118_B=1 if stream_118`i'=="B"

}
lab def yesnolbl 1 Yes 0 No
foreach var in  stream_118_B stream_118_A{
	lab val `var' yesnolbl
	lab var `var' "118_Which stream(s)of S4 do you teach?"
}
forval i=1/3{
	drop stream_118`i'
}
order stream_118_A stream_118_B, after(stream_118)

	*118
gen uopt_118=upper(opt_118)
*g uopt_118_str=subinstr(uopt_118 ," ", ",",.)
replace uopt_118="MPC,PCB,PCM" if uopt_118=="MPC PCB PCM"
replace uopt_118="MEG,LKK" if uopt_118=="MEG LKK"
replace uopt_118="MCB,HEG,LFK" if uopt_118==". MCB,HEG,LFK"
replace uopt_118="MEG,MCB,EKK" if uopt_118=="EG MCB EKK"
replace uopt_118="LKK,MCB,HGL" if uopt_118=="LKK MCB HGL"


*1. Ngororero District 

replace uopt_118="HEG,MEG,LFK" if key=="uuid:b645da8b-e887-4371-8d8b-77b6400afe34"

replace uopt_118="MEG,MCB,LFK" if key=="uuid:f6fecc71-6940-49e5-b97d-2d4046383414"

replace uopt_118="HEG,MCB,LFK" if key=="uuid:e0abe935-28fd-43e5-8c5b-ec977cd7c439"

*2. Gakenke District

replace uopt_118="HEG,LFK,MCE" if key=="uuid:4a2cebf6-8dc0-4ca6-bb6f-adba52cac9f7"

*3. Karongi District

replace uopt_118="MPG,HGL" if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"

replace uopt_118="MEG,MCE,MPG" if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"

*4. Rulindo District

replace uopt_118="MCB,MCE,MEG" if key=="uuid:b9864580-4d1e-41fa-9889-4347bff583ca"

*5. Nyabihu District

replace uopt_118="MCE,MCB,MPG" if key=="uuid:647dcd0e-aecf-4401-8756-f4c449fa83d5"

*6 Musanze District

replace uopt_118="MCE" if key=="uuid:22cbf7e5-2410-4280-a3ae-1dba052753d8"

replace uopt_118="HEL,HEG,LEG,PCB,PCM,MCE,MPG,MPC" if key=="uuid:7ed83939-4dc4-40dd-8431-9b917f8fb7d0"

replace uopt_118="MCE,LFK" if key=="uuid:9164ac60-ca36-455a-b8d0-a923e5e74bc9"

replace uopt_118="MCE" if key=="uuid:ea226c92-d416-464e-8de5-d5d4f7e090f3"

replace uopt_118="MCE,LKK" if key=="uuid:f2e8770a-f488-433a-bd57-5dddb3f8b00e"

replace uopt_118="LFK,MEG" if key=="uuid:efb98f62-f809-41d1-99da-d0a93eb08618"

*7 Gicumbi District

replace uopt_118="LEG,LFK,MCE" if key=="uuid:04af7ffa-f4ca-48db-b97a-1647c832e213"

replace uopt_118="MPG,RHG,LFK" if key=="uuid:016cd74f-f348-473d-8d3c-e418326d80d8"

* The surveyed teacher is not teaching S4, therefore there is no specificatipon of subjects
replace uopt_118="" if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"

*8 Ngoma District

replace uopt_118="MEG,MCB,LKK" if key=="uuid:4e5f9443-2cae-4995-ae51-308ef1df4f74"

replace uopt_118="HEG,LFK" if key=="uuid:a10b71c2-6ed5-48e7-9306-52625f8c7f0e"

*9 Gatsibo District

replace uopt_118="MEG,MCB,PCB,PCM,MPG" if key=="uuid:8e130d16-8f38-4d3d-a09e-7a0359786068"

replace uopt_118="" if key=="uuid:ea588995-0147-4cca-a631-0c5609fef3b8"

replace uopt_118="MCE,MEG" if key=="uuid:720b8cd8-8095-4132-b73f-ef9e1328ca52"

replace uopt_118="LKK,PCB" if key=="uuid:62573913-709a-4e43-9889-3e5b009e48d3"

replace uopt_118="MPG,HEL,LFK" if key=="uuid:c520e356-5190-431e-8bf8-d10286108053"

*10. Kayonza District

replace uopt_118="MCE" if key=="uuid:5203694d-0eb4-4de9-8df9-dda890bda576"

replace uopt_118="MCB,PCB,MCE" if key=="uuid:9fb7f00a-1684-4141-bd89-6973d1174dec"

*Bugesera District

replace uopt_118="MPG,MPC,PCM,MCB,PCB" if key=="uuid:5da2457a-23dd-4e5e-bb11-0cdccc1b7861"

replace uopt_118="MCE,LKK" if key=="uuid:b918e507-e35d-4a29-9ee4-8abb5e0b0894"


replace opt_118=uopt_118
drop uopt_118
split opt_118, parse(,)
#delimit;
global myalist 
PCM
PCB
MCB
MPG
MPC
MEG
MCE
HEG
HEL
LFK
LKK
LKF
BCG
HGL
LEG
RHL
RHG;
#delimit cr

foreach k of global myalist{
	g opt_118_`k'=0
	
}
/*
gen opt_118_PCM_bis=0
forval i=1/8{
replace opt_118_PCM_bis=1 if inlist(opt_118`i',"PCM","PMC","CMP","CPM","MCP","MPC")
replace opt_118_PCM=1 if regexm(opt_118`i',"P")==1 & regexm(opt_118`i',"C")==1 & regexm(opt_118`i',"M")==1
}
*/
forval i=1/8{
	replace opt_118`i'=strtrim(opt_118`i')
	replace opt_118_PCM=1 if opt_118`i'=="PCM"
	replace opt_118_PCB=1 if opt_118`i'=="PCB"
	replace opt_118_MCB=1 if opt_118`i'=="MCB"
	replace opt_118_MPG=1 if opt_118`i'=="MPG"
	replace opt_118_MPC=1 if opt_118`i'=="MPC"
	replace opt_118_MEG=1 if opt_118`i'=="MEG"
	replace opt_118_MCE=1 if opt_118`i'=="MCE"
	replace opt_118_HEG=1 if opt_118`i'=="HEG"
	replace opt_118_HEL=1 if opt_118`i'=="HEL"
	replace opt_118_LFK=1 if opt_118`i'=="LFK"|opt_118`i'=="EFK"
	replace opt_118_LKK=1 if opt_118`i'=="LKK"|opt_118`i'=="EKK"
	replace opt_118_LKF=1 if opt_118`i'=="LKF"|opt_118`i'=="EKF"
	replace opt_118_BCG=1 if opt_118`i'=="BCG"
	replace opt_118_HGL=1 if opt_118`i'=="HGL"
	replace opt_118_LEG=1 if opt_118`i'=="LEG"|opt_118`i'=="EEG"
	replace opt_118_RHL=1 if opt_118`i'=="RHL"
	replace opt_118_RHG=1 if opt_118`i'=="RHG"
}
foreach a of global myalist{
lab var opt_118_`a' "118_which options of S4 do you teach?"
lab val opt_118_`a' yesnolbl
}
*****Check if something is missing***
cap drop opt_118count
gen opt_118count=0
foreach k of global myalist{
replace opt_118count=opt_118count+opt_118_`k'
}
cap drop opt_118countN
gen opt_118countN=0
forval i=1/8{
replace opt_118countN=opt_118countN + 1 if opt_118`i'!=""
}
di "You'll need to check the questionnaires for the following"
count if opt_118countN!=opt_118count
if `r(N)'!=0{
list province district uniqueid school uniqueid opt_118 if opt_118countN!=opt_118count
export excel province district uniqueid school uniqueid opt_118 using "Add_Check_Subjects_opt118.xlsx" if opt_118countN!=opt_118count , replace
}

forval i=1/8{
drop opt_118`i'
}
order opt_118_*, after(opt_118)

drop opt_118count*

*opt_118_PCM opt_118_PCB opt_118_MCB opt_118_MPG opt_118_MPC opt_118_MEG opt_118_MCE opt_118_HEL opt_118_LFK opt_118_LKK opt_118_LKF opt_118_BCG opt_118_HGL opt_118_LEG opt_118_RHL opt_118_RHG

	*122 Subjects
*Subjects in S4
*destring oth_subj_s4_122, replace
*rename oth_subj_s4_122_1 oth_subj_s4_122
replace oth_subj_s4_122="-66" if key=="uuid:77447f4d-38f2-43e1-b352-84a89f0d3f5a"
replace oth_subj_s4_122="-66" if key=="uuid:ce2e1f42-3e6d-4c54-b64e-719eb3347a37"
replace oth_subj_s4_122="-66" if key=="uuid:067dafab-899f-4ae4-b383-c0f7e102aeb2"
replace oth_subj_s4_122="-66" if key=="uuid:7234f537-7d82-4398-b11a-7805fd3a929d"
replace oth_subj_s4_122="-66" if key=="uuid:672dc92c-79a0-4487-bc23-5d5bb50b5f5e"
replace oth_subj_s4_122="-66" if key=="uuid:24dd1097-9fbb-4b82-9086-d215c442c6f3"
replace oth_subj_s4_122="-66" if key=="uuid:c81a0bf4-99a1-4323-b1eb-9d3b39a2fb8e"
replace oth_subj_s4_122="-66" if key=="uuid:4d7c7114-dfba-409c-8547-a5d2567e0969"
replace oth_subj_s4_122="-66" if key=="uuid:4e82294b-bf9c-4af7-a9c3-be9d9b8982c1"
replace oth_subj_s4_122="-66" if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace oth_subj_s4_122="-66" if key=="uuid:4a2cebf6-8dc0-4ca6-bb6f-adba52cac9f7"
replace oth_subj_s4_122="-66" if key=="uuid:241921c1-9628-4e2c-a652-49338ec1c09d"
replace oth_subj_s4_122="-66" if key=="uuid:b574f054-ae19-4db9-8642-04374ac8ed86"
replace oth_subj_s4_122="-66" if key=="uuid:4ae71431-1c63-42e5-b31d-513bc11fb27d"
replace oth_subj_s4_122="-66" if key=="uuid:10d7e455-b4f3-429e-bcbe-9385dbdbf815"
replace oth_subj_s4_122="-66" if key=="uuid:720b8cd8-8095-4132-b73f-ef9e1328ca52"
replace oth_subj_s4_122="-66" if key=="uuid:62573913-709a-4e43-9889-3e5b009e48d3"
replace oth_subj_s4_122="-66" if key=="uuid:6ac5859a-3809-4c6f-a56d-b24db2ac697c"
replace oth_subj_s4_122="-66" if key=="uuid:5203694d-0eb4-4de9-8df9-dda890bda576"
replace oth_subj_s4_122="-66" if key=="uuid:818f0581-9dfd-46a3-b26d-7d0dae83e768"
replace oth_subj_s4_122="-66" if key=="uuid:8b612907-7f68-4731-84f7-7babb15e58cf"
replace oth_subj_s4_122="-66" if key=="uuid:f9f3d492-3479-4f95-964f-f990dd323b42"
replace oth_subj_s4_122="-66" if key=="uuid:fdcf4dfe-21f3-4c14-b28a-4414937e226b"
replace oth_subj_s4_122="-66" if key=="uuid:a7e546dd-894d-4cfa-a68b-74449c3833c2"
replace oth_subj_s4_122="-66" if key=="uuid:2df4cc5c-fbf0-4915-b90c-111689cc7266"
replace oth_subj_s4_122="-66" if key=="uuid:5ab17346-b4b8-4d5a-a42b-2b4987f591ab"
replace oth_subj_s4_122="-66" if key=="uuid:84c9b20c-0536-4deb-9af8-74eb260af98e"
replace oth_subj_s4_122="-66" if key=="uuid:bb35e662-6d9e-4582-b67d-72a77edf4b2c"
replace oth_subj_s4_122="-66" if key=="uuid:429cb933-2b4a-4ca4-9d99-2ee7ef5eb0c2"
replace oth_subj_s4_122="-66" if key=="uuid:b5febac2-7c5f-4d47-9a03-3f03075c8a2d"

split oth_subj_s4_122, parse ("")
rename oth_subj_s4_1221 oth_subj_s4_122_1
cap drop oth_subj_s4_1222 

order oth_subj_s4_122_1, after(oth_subj_s4_122)
cap drop oth_subj_s4_122
replace oth_subj_s4_122_1="" if oth_subj_s4_122_1=="-55"
rename oth_subj_s4_122_1 oth_subj_s4_122

destring oth_subj_s4_122, replace
#delimit ;
label define oth_subj_s4_122_1lab
1 "Physics"
2 "Chemistry"
3 "Maths"
4 "Biology"
5 "Physics"
6 "Geography"
7 "Economics"
8 "Histry"
9 "English"
10 "French"
11 "Kinyarwanda"
12 "Kiswahili"
13 "Computer Science"
14 "Lietrature"
-55 "No answer"
-66 "Other"
-77 "Not applicable";
#delimit cr

label val oth_subj_s4_122 oth_subj_s4_122_1lab

lab var oth_subj_s4_122 "122_Which other subjects do you teach in S4?"

*Subjects in S5

*destring oth_subj_s5_122, replace
replace oth_subj_s5_122="-66" if key=="uuid:7234f537-7d82-4398-b11a-7805fd3a929d"
replace oth_subj_s5_122="-66" if key=="uuid:672dc92c-79a0-4487-bc23-5d5bb50b5f5e"
replace oth_subj_s5_122="-66" if key=="uuid:4e82294b-bf9c-4af7-a9c3-be9d9b8982c1"
replace oth_subj_s5_122="-66" if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace oth_subj_s5_122="-66" if key=="uuid:4a2cebf6-8dc0-4ca6-bb6f-adba52cac9f7"
replace oth_subj_s5_122="-66" if key=="uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100"
replace oth_subj_s5_122="-66" if key=="uuid:04af7ffa-f4ca-48db-b97a-1647c832e213"
replace oth_subj_s5_122="-66" if key=="uuid:4ae71431-1c63-42e5-b31d-513bc11fb27d"
replace oth_subj_s5_122="-66" if key=="uuid:720b8cd8-8095-4132-b73f-ef9e1328ca52"
replace oth_subj_s5_122="-66" if key=="uuid:62573913-709a-4e43-9889-3e5b009e48d3"
replace oth_subj_s5_122="-66" if key=="uuid:9bb52034-83b3-4ebd-8f2c-c7eca9793e66"
replace oth_subj_s5_122="-66" if key=="uuid:8b612907-7f68-4731-84f7-7babb15e58cf"
replace oth_subj_s5_122="-66" if key=="uuid:84c9b20c-0536-4deb-9af8-74eb260af98e"
replace oth_subj_s5_122="-66" if key=="uuid:fdde786f-7f4e-4855-9d2c-a5ae99c2378c"

destring oth_subj_s5_122, replace
#delimit ;
label define oth_subj_s5_122lab
1 "Physics"
2 "Chemistry"
3 "Maths"
4 "Biology"
5 "Physics"
6 "Geography"
7 "Economics"
8 "Histry"
9 "English"
10 "French"
11 "Kinyarwanda"
12 "Kiswahili"
13 "Computer Science"
14 "Lietrature"
-55 "No answer"
-66 "Other"
-77 "Not applicable";
#delimit cr

label val oth_subj_s5_122 oth_subj_s5_122lab

replace oth_subj_s5_122=. if oth_subj_s5_122==-55

*Subjects in S6

*destring oth_subj_s6_122, replace
replace oth_subj_s6_122="-66" if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
replace oth_subj_s6_122="-66" if key=="uuid:7234f537-7d82-4398-b11a-7805fd3a929d"
replace oth_subj_s6_122="-66" if key=="uuid:672dc92c-79a0-4487-bc23-5d5bb50b5f5e"
replace oth_subj_s5_122_other="Geography" if key=="uuid:fac78d8a-65bd-497f-a10b-77c24b5bab1c"
replace oth_subj_s6_122="-66" if key=="uuid:f6fecc71-6940-49e5-b97d-2d4046383414"
replace oth_subj_s6_122="-66" if key=="uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100"
replace oth_subj_s6_122="-66" if key=="uuid:4ae71431-1c63-42e5-b31d-513bc11fb27d"
replace oth_subj_s6_122="-66" if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace oth_subj_s6_122="-66" if key=="uuid:4005f158-d2fc-45f9-8313-f395c1475519"
replace oth_subj_s6_122="-66" if key=="uuid:720b8cd8-8095-4132-b73f-ef9e1328ca52"
replace oth_subj_s6_122="-66" if key=="uuid:62573913-709a-4e43-9889-3e5b009e48d3"
replace oth_subj_s6_122="-66" if key=="uuid:9bb52034-83b3-4ebd-8f2c-c7eca9793e66"
replace oth_subj_s6_122="-66" if key=="uuid:8b612907-7f68-4731-84f7-7babb15e58cf"
replace oth_subj_s6_122="-66" if key=="uuid:fdde786f-7f4e-4855-9d2c-a5ae99c2378c"
replace oth_subj_s6_122="-66" if key=="uuid:045ffebc-2461-4198-8ca4-64bea9903a85"

destring oth_subj_s6_122, replace
#delimit ;
label define oth_subj_s6_122lab
1 "Physics"
2 "Chemistry"
3 "Maths"
4 "Biology"
5 "Physics"
6 "Geography"
7 "Economics"
8 "Histry"
9 "English"
10 "French"
11 "Kinyarwanda"
12 "Kiswahili"
13 "Computer Science"
14 "Lietrature"
-55 "No answer"
-66 "Other"
-77 "Not applicable";
#delimit cr

label val oth_subj_s6_122 oth_subj_s6_122lab

replace oth_subj_s6_122=. if oth_subj_s6_122==-55


* SECTION 2. TEACHER EXPERIENCE & TRAINING

	*
replace age_201=. if  age_201==-55

	*202 Position 
destring pos_202, replace
#delimit ;
label define pos_202lab
1 "HeadTeacher"
2 "Deputy HeadTeacher"
3 "Teacher";
#delimit cr

label val pos_202 pos_202lab

drop pos_202_other

*205 T's Contract

replace contr_205="-66" if contr_205=="other"

destring contr_205, replace
#delimit ;
label define contr_205lab
1 "One-year contract"
2 "Multi-year or indefinite contract"
-66 "Other"
-99 "Don't know";
#delimit cr

label val contr_205 contr_205lab

	*206
drop yrbeginteach_appl_206
gen my206=year(yrbeginteach_206)
drop yrbeginteach_206
rename my206 yrbeginteach_206
lab var yrbeginteach_206 "206_Which year did you begin formal teaching"

	*207
gen my207=year(yrteachhere_207)
drop yrteachhere_207
rename my207 yrteachhere_207
lab var yrteachhere_207 "207_Which year did you begin teaching at this school"


*The answer was No Answer (-55). JB checked from HT survey and found that he is a fulltime teacher
replace fullpart_204=1 if key=="uuid:59cb4570-b945-4d78-a997-4deb0e57d134"
replace fullpart_204=1 if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"

destring contr_205, replace
replace contr_205=-66 if key=="uuid:f33a0cdb-70d0-4ee2-88eb-a6a47a812c5a"
replace contr_205=-66 if key=="uuid:b55b68b8-4e60-4ec7-b042-f8ed70161a34"
replace contr_205=-66 if key=="uuid:164b17b2-7627-4441-b21c-81fe95c5bcf7"
replace contr_205=-66 if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace contr_205=-66 if key=="uuid:9f214da2-771c-4ef8-9ffd-27f8dfbcfccc"

*On question, if the answer was in months, the code was -33
*Here it is 3 months 
replace yrspublsch_209=3/12 if key=="uuid:93c9b2c9-81ff-456e-9283-e40640548d46"


	*212 & 213
foreach var in femalestud_212 malestud_212 all_f_stud_213 all_m_stud_213{
replace `var'=. if inlist(`var', -55,-99,-77)
}


* School has no boys. The code -77 or -55 was treated as missing variable for questions 212 ands 213. 
replace malestud_212=. if key=="uuid:5da2457a-23dd-4e5e-bb11-0cdccc1b7861"
replace malestud_212=. if key=="uuid:84c9b20c-0536-4deb-9af8-74eb260af98e"
replace malestud_212=. if key=="uuid:2de406d8-0dfb-4016-80b6-541dd4491db5"
replace malestud_212=. if key=="uuid:5203694d-0eb4-4de9-8df9-dda890bda576"
replace malestud_212=. if key=="uuid:5203694d-0eb4-4de9-8df9-dda890bda576"

replace all_m_stud_213=. if key=="uuid:5203694d-0eb4-4de9-8df9-dda890bda576"
replace all_f_stud_213=. if key=="uuid:5203694d-0eb4-4de9-8df9-dda890bda576"
replace malestud_212=. if key=="uuid:b55b68b8-4e60-4ec7-b042-f8ed70161a34"
replace all_m_stud_213=. if key=="uuid:b55b68b8-4e60-4ec7-b042-f8ed70161a34"
replace malestud_212=. if key=="uuid:3934da24-721f-4c78-9ec8-18bcb7309e4a"
replace all_m_stud_213=. if key=="uuid:3934da24-721f-4c78-9ec8-18bcb7309e4a"
replace malestud_212=. if key=="uuid:6e24ba7a-7b91-4022-8db2-1c5418ec5ac5"
replace all_m_stud_213=. if key=="uuid:6e24ba7a-7b91-4022-8db2-1c5418ec5ac5"
replace malestud_212=. if key=="uuid:0937c23e-a48b-4784-a744-fb55e3a12c5a"
replace malestud_212=. if key=="uuid:8d884232-390e-472c-aa18-9ffd71b19fc6"
replace all_m_stud_213=. if key=="uuid:8d884232-390e-472c-aa18-9ffd71b19fc6"
replace malestud_212=. if key=="uuid:b9864580-4d1e-41fa-9889-4347bff583ca"
replace all_m_stud_213=. if key=="uuid:b9864580-4d1e-41fa-9889-4347bff583ca"
replace malestud_212=. if key=="uuid:f7d8b31e-c10c-47ad-9810-4e24ed640c7d"
replace malestud_212=. if key=="uuid:f7d8b31e-c10c-47ad-9810-4e24ed640c7d"
replace all_m_stud_213=. if key=="uuid:f7d8b31e-c10c-47ad-9810-4e24ed640c7d"
replace malestud_212=. if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"
replace all_m_stud_213=. if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"

replace malestud_212=. if malestud_212==-55
replace malestud_212=. if femalestud_212==-55
replace all_m_stud_213=. if all_m_stud_213==-55
replace all_f_stud_213=. if all_f_stud_213==-55

*T's answers were -77 or -99. Checking from HT, the their numbers were verified. 
replace malestud_212=15 if key=="uuid:045ffebc-2461-4198-8ca4-64bea9903a85"
replace femalestud_212=13 if key=="uuid:045ffebc-2461-4198-8ca4-64bea9903a85"
replace malestud_212=28 if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace femalestud_212=45 if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace malestud_212=30 if key=="uuid:f86d4223-3469-499b-96c1-815e2431e79b"
replace femalestud_212=28 if key=="uuid:f86d4223-3469-499b-96c1-815e2431e79b"
replace all_m_stud_213=68 if key=="uuid:f86d4223-3469-499b-96c1-815e2431e79b"
replace all_f_stud_213=71 if key=="uuid:f86d4223-3469-499b-96c1-815e2431e79b"
replace malestud_212=13 if key=="uuid:d9c5494e-9b1e-48df-97a3-41db8f95a04d"
replace femalestud_212=9 if key=="uuid:d9c5494e-9b1e-48df-97a3-41db8f95a04d"
replace all_m_stud_213=90 if key=="uuid:d9c5494e-9b1e-48df-97a3-41db8f95a04d"
replace all_f_stud_213=96 if key=="uuid:d9c5494e-9b1e-48df-97a3-41db8f95a04d"
replace malestud_212=22 if key=="uuid:9fb7f00a-1684-4141-bd89-6973d1174dec"
replace femalestud_212=10 if key=="uuid:9fb7f00a-1684-4141-bd89-6973d1174dec"
replace all_m_stud_213=114 if key=="uuid:9fb7f00a-1684-4141-bd89-6973d1174dec"
replace all_f_stud_213=64 if key=="uuid:9fb7f00a-1684-4141-bd89-6973d1174dec"
replace malestud_212=46 if key=="uuid:b49e0dbb-f308-454f-a46b-d0de6fd94742"
replace femalestud_212=42 if key=="uuid:b49e0dbb-f308-454f-a46b-d0de6fd94742"
replace malestud_212=30 if key=="uuid:599ed820-3a41-42cd-8d81-200eee9cd6ed"
replace femalestud_212=22 if key=="uuid:599ed820-3a41-42cd-8d81-200eee9cd6ed"
replace all_m_stud_213=80 if key=="uuid:599ed820-3a41-42cd-8d81-200eee9cd6ed"
replace all_f_stud_213=59 if key=="uuid:599ed820-3a41-42cd-8d81-200eee9cd6ed"
replace malestud_212=10 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace femalestud_212=29 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace all_m_stud_213=12 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace all_f_stud_213=27 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace malestud_212=11 if key=="uuid:0051f991-17cb-4c3b-b03a-38ea85650a85"
replace femalestud_212=17 if key=="uuid:0051f991-17cb-4c3b-b03a-38ea85650a85"
replace malestud_212=42 if key=="uuid:5885d12a-9217-4ba9-b0e6-3a7c23367d7f"
replace femalestud_212=26 if key=="uuid:5885d12a-9217-4ba9-b0e6-3a7c23367d7f"
replace malestud_212=28 if key=="uuid:33bd67cb-c4c8-4992-9cdb-62f43924c928"
replace femalestud_212=45 if key=="uuid:33bd67cb-c4c8-4992-9cdb-62f43924c928"
replace malestud_212=20 if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace femalestud_212=29 if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace malestud_212=12 if key=="uuid:dfe174b8-491d-4537-902f-1c51138b281f"
replace femalestud_212=20 if key=="uuid:dfe174b8-491d-4537-902f-1c51138b281f"
replace malestud_212=11 if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace femalestud_212=11 if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace all_m_stud_213=-99 if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace all_f_stud_213=-99 if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace malestud_212=20 if key=="uuid:c5987cd3-2cfc-43c7-8f5d-25fce77396da"
replace femalestud_212=21 if key=="uuid:c5987cd3-2cfc-43c7-8f5d-25fce77396da"
replace malestud_212=18 if key=="uuid:a4797132-b679-417e-933e-48cf1ae2f080"
replace femalestud_212=19 if key=="uuid:a4797132-b679-417e-933e-48cf1ae2f080"
replace malestud_212=14 if key=="uuid:95712d53-7478-4b9d-9b09-f0b9444da1f5"
replace femalestud_212=19 if key=="uuid:95712d53-7478-4b9d-9b09-f0b9444da1f5"
replace malestud_212=124 if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace femalestud_212=53 if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace all_m_stud_213=199 if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace all_f_stud_213=86 if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace malestud_212=12 if key=="uuid:fac78d8a-65bd-497f-a10b-77c24b5bab1c"
replace femalestud_212=14 if key=="uuid:fac78d8a-65bd-497f-a10b-77c24b5bab1c"
*replace classes_214=. if key=="uuid:9fb7f00a-1684-4141-bd89-6973d1174dec"
*replace classes_214=. if key=="uuid:7b50a980-0652-4c88-8c21-8416f1d0ec38"


replace classes_214=0 if key=="uuid:7b50a980-0652-4c88-8c21-8416f1d0ec38"
replace classes_214=0 if key=="uuid:9fb7f00a-1684-4141-bd89-6973d1174dec"



/* Question 215: the answer was that the teacher shifted from his old school because 
students were requested to shift to this school. So he shifted together with his students.
This reason is not among the suggested options, thus it was coded as 3"Routine transfer".
See if it can be matched with 7"Personally, I applied here"
*/

replace reas_215=3 if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"

*217 T's Education training

tostring train_217, replace
replace train_217="-66" if key=="uuid:8d884232-390e-472c-aa18-9ffd71b19fc6"
replace train_217="-66" if key=="uuid:045ffebc-2461-4198-8ca4-64bea9903a85"
replace train_217="-66" if key=="uuid:6956187d-150c-4e77-9f09-bc61cc4292e2"
replace train_217="-66" if key=="uuid:9a03d7bb-32be-4013-96fc-711a80b0e5ae"
replace train_217="-66" if key=="uuid:b8875287-1467-4d0c-baa5-f178d325ce63"
replace train_217="-66" if key=="uuid:a1393010-9ef5-4586-bcd9-c7f00e3637af"
replace train_217="-66" if key=="uuid:1cbc07e7-ab2e-4b26-bc09-35c05f741b79"
replace train_217="-66" if key=="uuid:8e130d16-8f38-4d3d-a09e-7a0359786068"
replace train_217="-66" if key=="uuid:9bb52034-83b3-4ebd-8f2c-c7eca9793e66"
replace train_217="." if key=="uuid:6f55eca2-ece2-4aa2-ac10-73d6fb2fac00"
replace train_217="-66" if key=="uuid:067dafab-899f-4ae4-b383-c0f7e102aeb2"
replace train_217="-66" if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace train_217_other="Treacher training for capacity building" if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace train_217="-66" if key=="uuid:81eec131-93ff-4f4d-aa8a-09e70959bb07"
replace train_217="-66" if key=="uuid:b5febac2-7c5f-4d47-9a03-3f03075c8a2d"
replace train_217="-66" if key=="uuid:71758029-7b28-41bc-9b72-0cee6aa394d9"
replace train_217="-66" if key=="uuid:2601bbd6-649c-4170-8387-9e1f0092bfd8"
replace train_217="-66" if key=="uuid:b574f054-ae19-4db9-8642-04374ac8ed86"
replace train_217="-66" if key=="uuid:bb425648-156c-4369-96c0-81f84f599d9f"
replace train_217="-66" if key=="uuid:b645da8b-e887-4371-8d8b-77b6400afe34"
replace train_217="-66" if key=="uuid:f6fecc71-6940-49e5-b97d-2d4046383414"
replace train_217="4" if key=="uuid:31a93988-6762-4f27-99c8-f6a19655642d"
replace train_217_other="." if key=="uuid:31a93988-6762-4f27-99c8-f6a19655642d"
replace train_217="-66" if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace train_217="3" if key=="uuid:04af7ffa-f4ca-48db-b97a-1647c832e213"
replace train_217_other="." if key=="uuid:04af7ffa-f4ca-48db-b97a-1647c832e213"
replace train_217="-66" if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace train_217="-66" if key=="uuid:edeb349c-b5e7-4e5b-b6f6-3ab75ab05eef"
replace train_217_other="A2 in Education" if key=="uuid:edeb349c-b5e7-4e5b-b6f6-3ab75ab05eef"
replace train_217="-66" if key=="uuid:d58cabf5-e4fa-4445-bff0-a941e5e5a998"
replace train_217="-66" if key=="uuid:52a8675c-6991-424a-8a7e-d1945be120b5"
replace train_217="2" if key=="uuid:a4797132-b679-417e-933e-48cf1ae2f080"
replace train_217="-66" if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
replace train_217="-66" if key=="uuid:f7d8b31e-c10c-47ad-9810-4e24ed640c7d"
replace train_217="-66" if key=="uuid:e812903d-3027-49d1-be5c-aa19201a8d5b"
replace train_217="-66" if key=="uuid:4d7c7114-dfba-409c-8547-a5d2567e0969"
replace train_217="-66" if key=="uuid:2913510c-aa1d-4930-ad6e-f07cb938d4c4"
replace train_217_other="A2 in Education" if key=="uuid:2913510c-aa1d-4930-ad6e-f07cb938d4c4"
replace train_217="-66" if key=="uuid:ed79b9c6-462d-46f8-9b26-e5642318f83e"

replace train_217="4" if train_217=="."
count if yreduc_218==.
replace train_217_other="" if train_217_other=="."

destring train_217, replace
#delimit ;
label define train_217lab
1 "Completed 2-year training program including Teaching Practice"
2 "Completed 4-year program in University including Teaching Practice"
3 "Currently in a Teacher Training College"
4 "None"
-55 "No answer"
-66 "Other"
-99 "Don't know";
#delimit cr

label val train_217 train_217lab

*The code was 2 for NO
*label define rememb_date_218lab 1 "No", replace
*replace rememb_date_218=1 if key=="uuid:045ffebc-2461-4198-8ca4-64bea9903a85"
*replace rememb_date_218=2 if key=="uuid:1cbc07e7-ab2e-4b26-bc09-35c05f741b79"
*replace rememb_date_218=2 if key=="uuid:6f55eca2-ece2-4aa2-ac10-73d6fb2fac00"
*replace rememb_date_218=1 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
*replace rememb_date_218=2 if key=="uuid:31a93988-6762-4f27-99c8-f6a19655642d"
*replace yreduc_218=2 if key=="uuid:31a93988-6762-4f27-99c8-f6a19655642d"
*replace rememb_date_218=1 if key=="uuid:3e67d431-2ea3-4b1e-87ee-0747c6d420fc"

	*218
	
drop rememb_date_218
gen double m7_218a=cofC(yreduc_218)
replace yreduc_218=18993 if key=="uuid:3e67d431-2ea3-4b1e-87ee-0747c6d420fc"
replace yreduc_218=19359 if key=="uuid:11b810b2-7633-40ae-b851-ea40b37a8383"
replace yreduc_218=. if key=="uuid:04af7ffa-f4ca-48db-b97a-1647c832e213"

*sum #Check yreduc_218
*Checked by JB!
gsort -yreduc_218
replace yreduc_218=18597 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace yreduc_218=20209 if key=="uuid:9dce7ea6-e0a7-4cb4-b612-d30b4984489d"
replace yreduc_218=19571 if key=="uuid:a4797132-b679-417e-933e-48cf1ae2f080"
replace yreduc_218=18962 if key=="uuid:b9864580-4d1e-41fa-9889-4347bff583ca"
order yreduc_218, after(train_217_other)

	*219

gen my_209=cofC(yreduc_219)
replace yreduc_219=. if key=="uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100"
replace attended_219=1 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace attended_219=1 if key=="uuid:8f6f3f87-c7c9-4fff-9dc4-e0c55603a67d"

*sum #CheckBelow
replace attended_219=. if key=="uuid:b5febac2-7c5f-4d47-9a03-3f03075c8a2d"
replace attended_219=. if key=="uuid:31a93988-6762-4f27-99c8-f6a19655642d"
replace attended_219=. if key=="uuid:164b17b2-7627-4441-b21c-81fe95c5bcf7"

replace yreduc_219=20521 if key=="uuid:8f6f3f87-c7c9-4fff-9dc4-e0c55603a67d"
replace yreduc_219=20179 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace yreduc_219=18444 if key=="uuid:a4797132-b679-417e-933e-48cf1ae2f080"

replace attended_219=-77 if key=="uuid:04af7ffa-f4ca-48db-b97a-1647c832e213"
replace yreduc_219=. if key=="uuid:04af7ffa-f4ca-48db-b97a-1647c832e213"
replace attended_219=-77 if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"
replace yreduc_219=. if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"
replace attended_219=-77 if key=="uuid:9dce7ea6-e0a7-4cb4-b612-d30b4984489d"
replace yreduc_219=. if key=="uuid:9dce7ea6-e0a7-4cb4-b612-d30b4984489d"
replace attended_219=-77 if key=="uuid:73a7c9ec-a25d-4ca3-8e8f-aed2926b5343"
replace yreduc_219=. if key=="uuid:73a7c9ec-a25d-4ca3-8e8f-aed2926b5343"
replace attended_219=-77 if key=="uuid:672dc92c-79a0-4487-bc23-5d5bb50b5f5e"
replace yreduc_219=. if key=="uuid:672dc92c-79a0-4487-bc23-5d5bb50b5f5e"

replace attended_219=. if attended_219==-55

	*220

replace traincurr_220=0 if nbrtrain_220==.
	
replace traincurr_220=0 if key=="uuid:1dc0124e-2f1f-4ab2-a2a1-6d600cea1020"
replace traincurr_220=. if key=="uuid:1cbc07e7-ab2e-4b26-bc09-35c05f741b79"
replace traincurr_220=1 if key=="uuid:1d39600c-54bf-471f-be2b-034f559820fb"
replace nbrtrain_220=1 if key=="uuid:1d39600c-54bf-471f-be2b-034f559820fb"
replace nbrtrain_220=. if key=="uuid:37b252d7-d8de-4d20-a4c1-e843660a58a9"
replace nbrtrain_220=. if key=="uuid:8599f2d0-b681-45c4-890e-32d07644db81"
replace nbrtrain_220=. if key=="uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100"
replace traincurr_220=. if key=="uuid:41701546-3455-4524-b8b1-8645a5e34345"
replace traincurr_220=0 if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace nbrtrain_220=. if key=="uuid:0051f991-17cb-4c3b-b03a-38ea85650a85"
replace nbrtrain_220=. if key=="uuid:b574f054-ae19-4db9-8642-04374ac8ed86"
replace traincurr_220=. if key=="uuid:31a93988-6762-4f27-99c8-f6a19655642d"
replace nbrtrain_220=. if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"

	*221

gsort -trainentr_221
replace trainentr_221=0 if nbrtrainentr_221==.
replace trainentr_221=0 if nbrtrainentr_221==-77
replace nbrtrainentr_221=. if nbrtrainentr_221==-77
	
replace trainentr_221=0 if key=="uuid:fdde786f-7f4e-4855-9d2c-a5ae99c2378c"
replace trainentr_221=. if key=="uuid:ca07c2c5-ee65-4b3e-a5f7-9d29d5fdfaef"
replace trainentr_221=. if key=="uuid:1cbc07e7-ab2e-4b26-bc09-35c05f741b79"
replace trainentr_221=. if key=="uuid:720b8cd8-8095-4132-b73f-ef9e1328ca52"
replace trainentr_221=. if key=="uuid:3a59e989-fd54-4871-a5a6-1b81a870ee41"
replace trainentr_221=. if key=="uuid:81eec131-93ff-4f4d-aa8a-09e70959bb07"
replace trainentr_221=. if key=="uuid:fa8748f0-6307-4a17-af83-6739ed50015c"
replace nbrtrainentr_221=. if key=="uuid:b574f054-ae19-4db9-8642-04374ac8ed86"
replace nbrtrainentr_221=. if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace trainentr_221=. if key=="uuid:7b50a980-0652-4c88-8c21-8416f1d0ec38"
replace trainentr_221=. if key=="uuid:983f6eb0-c667-46a4-a689-087bac9ffe09"
replace trainentr_221=. if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace trainentr_221=. if key=="uuid:77447f4d-38f2-43e1-b352-84a89f0d3f5a"
replace trainentr_221=. if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace trainentr_221=. if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"

	*222

gsort -nbrobstrain_222
replace nbrobstrain_222=1 if key=="uuid:1cbc07e7-ab2e-4b26-bc09-35c05f741b79"
replace nbrobstrain_222=. if key=="uuid:9dce7ea6-e0a7-4cb4-b612-d30b4984489d"
	

/*
*The number of times on question 222 and 223 was "MANY". There was no possibility to enter this,
Thus the code -99 was given just to mean "Don't Know"
*/
replace nbrobstrain_222=-99 if key=="uuid:cd600a6f-84d8-416b-a86c-bceed4e46ff5"

	*223
* nbrothobstrain_223 was string
replace nbrothobstrain_223="-99" if key=="uuid:cd600a6f-84d8-416b-a86c-bceed4e46ff5"
replace nbrothobstrain_223="." if key=="uuid:d58cabf5-e4fa-4445-bff0-a941e5e5a998"
destring nbrothobstrain_223, replace
	
	*224


	*225
replace writtlesso_225=. if key=="uuid:81eec131-93ff-4f4d-aa8a-09e70959bb07"

   
	*226
replace schcode_226=0 if schcode_226==-99

	*227
*sum #Check
*Checked by JB!
cap drop my_date
gen my_date=cofC(staffmeet_227)
order rememb_date_227, after(staffmeet_227)
gsort -staffmeet_227
*br rememb_date_227 staffmeet_227 

replace staffmeet_227=20509 if key=="uuid:fac78d8a-65bd-497f-a10b-77c24b5bab1c"
replace staffmeet_227=20487 if key=="uuid:cc879384-95db-482a-b9fd-0e0869d6f1fb"
replace staffmeet_227=20516 if key=="uuid:38c36d7b-5735-44d3-9b5f-e501bc551a22"
replace staffmeet_227=20520 if key=="uuid:1cbc07e7-ab2e-4b26-bc09-35c05f741b79"
replace staffmeet_227=20487 if key=="uuid:22cbf7e5-2410-4280-a3ae-1dba052753d8"

 	*228
replace attended_228=. if key=="uuid:5ee8d2e2-4f07-4ad9-8e29-cc017222b744"
replace attended_228=. if key=="uuid:4d02548c-f3e0-4608-b3b8-cbbdd6260b46"

	*229 Main topic for the meeting
	
gsort -meettop_229_other
*tostring meettop_229, replace
replace meettop_229="2" if key=="uuid:14213134-aa48-4be1-93a7-2bf6cd014b26"
replace meettop_229="-66" if key=="uuid:bb35e662-6d9e-4582-b67d-72a77edf4b2c"
replace meettop_229="." if key=="uuid:c9753657-eb30-4b37-84f3-f299ce3dcc6b"
replace meettop_229="-66" if key=="uuid:84c9b20c-0536-4deb-9af8-74eb260af98e"
replace meettop_229="-66" if key=="uuid:f8c744e1-2768-4fce-b811-5c2f0658f6e8"
replace meettop_229="-66" if key=="uuid:a1393010-9ef5-4586-bcd9-c7f00e3637af"
replace meettop_229="-66" if key=="uuid:59cb4570-b945-4d78-a997-4deb0e57d134"
replace meettop_229="-66" if key=="uuid:9721f257-7c79-4b3b-b859-02bbdf4e7d3e"
replace meettop_229="." if key=="uuid:1dc0124e-2f1f-4ab2-a2a1-6d600cea1020"
replace meettop_229="." if key=="uuid:93c9b2c9-81ff-456e-9283-e40640548d46"
replace meettop_229="." if key=="uuid:2de406d8-0dfb-4016-80b6-541dd4491db5"
replace meettop_229="-66" if key=="uuid:e1d170d7-c34c-4783-83d3-eb38922d2019"
replace meettop_229="-66" if key=="uuid:78390e0d-363c-4875-b9e3-a55f91e370c4"
replace meettop_229="-66" if key=="uuid:1d39600c-54bf-471f-be2b-034f559820fb"
replace meettop_229="-66" if key=="uuid:6e76b875-fba0-4d2d-887c-f8cd76409d5e"
replace meettop_229="-66" if key=="uuid:5ee8d2e2-4f07-4ad9-8e29-cc017222b744"
replace meettop_229="-66" if key=="uuid:8e130d16-8f38-4d3d-a09e-7a0359786068"
replace meettop_229="-66" if key=="uuid:6ac5859a-3809-4c6f-a56d-b24db2ac697c"
replace meettop_229="-66" if key=="uuid:9bb52034-83b3-4ebd-8f2c-c7eca9793e66"
replace meettop_229="-66" if key=="uuid:8254f9be-93e1-461e-8a28-43c830a13f4e"
replace meettop_229="-66" if key=="uuid:c520e356-5190-431e-8bf8-d10286108053"
replace meettop_229="-66" if key=="uuid:720b8cd8-8095-4132-b73f-ef9e1328ca52"
replace meettop_229="-66" if key=="uuid:3a59e989-fd54-4871-a5a6-1b81a870ee41"
replace meettop_229="-66" if key=="uuid:89c86086-6449-416f-b1bf-93f04343d9a7"
replace meettop_229="-66" if key=="uuid:067dafab-899f-4ae4-b383-c0f7e102aeb2"
replace meettop_229="-66" if key=="uuid:c835b976-1fd3-448e-a51e-e97cdaa01722"
replace meettop_229="-66" if key=="uuid:ded79d66-82f7-4281-be9f-ac17274d8a32"
replace meettop_229="-66" if key=="uuid:8599f2d0-b681-45c4-890e-32d07644db81"
replace meettop_229="-66" if key=="uuid:f2e8770a-f488-433a-bd57-5dddb3f8b00e"
replace meettop_229="-66" if key=="uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100"
replace meettop_229="-66" if key=="uuid:4ae71431-1c63-42e5-b31d-513bc11fb27d"
replace meettop_229="-66" if key=="uuid:016cd74f-f348-473d-8d3c-e418326d80d8"
replace meettop_229="." if key=="uuid:930d147e-0019-4dc0-93e6-0738e2820052"
replace meettop_229="-66" if key=="uuid:5c7fe1ea-4f67-41fc-be65-aacbca0dd474"
replace meettop_229="-66" if key=="uuid:81eec131-93ff-4f4d-aa8a-09e70959bb07"
replace meettop_229="-99" if key=="uuid:acdab979-e3f0-4b8e-80ef-ef954e2a7850"
replace meettop_229="-66" if key=="uuid:3934da24-721f-4c78-9ec8-18bcb7309e4a"
replace meettop_229="-66" if key=="uuid:0051f991-17cb-4c3b-b03a-38ea85650a85"
replace meettop_229="-66" if key=="uuid:6e24ba7a-7b91-4022-8db2-1c5418ec5ac5"
replace meettop_229="4" if key=="uuid:7a6ae7b4-c5ae-49c3-ab7e-7dc97440f517"
replace meettop_229="-66" if key=="uuid:9164ac60-ca36-455a-b8d0-a923e5e74bc9"
replace meettop_229="-66" if key=="uuid:b574f054-ae19-4db9-8642-04374ac8ed86"
replace meettop_229="-66" if key=="uuid:fdcf4dfe-21f3-4c14-b28a-4414937e226b"
replace meettop_229="-66" if key=="uuid:c63e401c-1eba-4ca4-850f-5de40befb0ef"
replace meettop_229="-66" if key=="uuid:95674371-81f4-4c88-83bf-d4b0a7489c47"
replace meettop_229="-66" if key=="uuid:2df4cc5c-fbf0-4915-b90c-111689cc7266"
replace meettop_229="-66" if key=="uuid:b645da8b-e887-4371-8d8b-77b6400afe34"
replace meettop_229_other="New competence based curriculum and required equipment" if key=="uuid:b645da8b-e887-4371-8d8b-77b6400afe34"
replace meettop_229="-66" if key=="uuid:97ec001b-1154-4355-bef7-0b460745bd7b"
replace meettop_229="-66" if key=="uuid:3e67d431-2ea3-4b1e-87ee-0747c6d420fc"
replace meettop_229="-66" if key=="uuid:24dd1097-9fbb-4b82-9086-d215c442c6f3"
replace meettop_229="." if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace meettop_229="." if key=="uuid:164b17b2-7627-4441-b21c-81fe95c5bcf7"
replace meettop_229="-66" if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace meettop_229="." if key=="uuid:4a2cebf6-8dc0-4ca6-bb6f-adba52cac9f7"
replace meettop_229="-66" if key=="uuid:571f7949-fadc-471f-8de4-9160b67f20e0"
replace meettop_229="-66" if key=="uuid:225fc8ea-722c-43a4-b29a-a09c1a2a810a"
replace meettop_229="-66" if key=="uuid:7b50a980-0652-4c88-8c21-8416f1d0ec38"
replace meettop_229_other="Exam preparation" if key=="uuid:7b50a980-0652-4c88-8c21-8416f1d0ec38"
replace meettop_229="-66" if key=="uuid:10510f32-937e-43aa-86e9-6bde669b52c0"
replace meettop_229="-66" if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
replace meettop_229="." if key=="uuid:4d02548c-f3e0-4608-b3b8-cbbdd6260b46"
replace meettop_229="." if key=="uuid:d61fa246-a24f-449c-bf7f-d6798ddb1311"
replace meettop_229="-66" if key=="uuid:22cbf7e5-2410-4280-a3ae-1dba052753d8"
replace meettop_229="-66" if key=="uuid:e812903d-3027-49d1-be5c-aa19201a8d5b"
replace meettop_229="-66" if key=="uuid:c93948d5-e360-4413-b0a9-ea9b5e58c3da"
replace meettop_229="-66" if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace meettop_229="-66" if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"
replace meettop_229="-66" if key=="uuid:b5febac2-7c5f-4d47-9a03-3f03075c8a2d"

destring meettop_229, replace
#delimit ;
label define meettop_229lab
1 "School Finance"
2 "Students attendance"
3 "Students performance"
4 "Students discipline"
5 "Teacher attendance/punctuality"
6 "General administrative issues"
-55 "No answer"
-66 "Other"
-99 "Don't know";
#delimit cr

label val meettop_229 meettop_229lab

    *230
*The answer for 230 was either -55 or -99 (it is replaced by 6 because generally e-ship class has 6 periods per week)
replace nbrlesso_230=6 if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace nbrlesso_230=6 if key=="uuid:93c9b2c9-81ff-456e-9283-e40640548d46"
replace nbrlesso_230=6 if key=="uuid:5ee8d2e2-4f07-4ad9-8e29-cc017222b744"

* SECTION 3. PEDAGOGY

	*300
	
*Most comfortable teaching Methods
split meth_300, parse ("")
rename meth_3001 meth_300_1
rename meth_3002 meth_300_2
rename meth_3003 meth_300_3
destring meth_300_3, replace

/*
#delimit ;
label define meth_300_3lab
1 "Lecture or note taking"
2 "Question & Answer"
3 "Quiz or Exam"
4 "Small Group Work"
5 "Games (e.g. energizers, competitions, cards, etc)"
6 "Class Discussion"
7 "Activities outside of the classroom"
8 "Reading from a text"
9 "Practice exercises" 
10 "Research (use of library or computer)"
11 "Experiment"
12 "Student Portfolio";
#delimit cr

label val meth_300_3 meth_300_3lab
*/	
g meth_300_mostcomf_Lect=0 
g meth_300_mostcomf_QandA=0 
g meth_300_mostcomf_Quiz=0 
g meth_300_mostcomf_GroupWork=0 
g meth_300_mostcomf_Games=0 
g meth_300_mostcomf_Discussion=0 
g meth_300_mostcomf_ActOutClass=0 
g meth_300_mostcomf_ReadFromText=0 
g meth_300_mostcomf_PracticeEx=0 
g meth_300_mostcomf_Research=0 
g meth_300_mostcomf_Experiment=0
g meth_300_mostcomf_Portfolio=0

forval i=1/3{
destring meth_300_`i',replace
replace meth_300_mostcomf_Lect=1 if meth_300_`i'==1
replace meth_300_mostcomf_QandA=1 if meth_300_`i'==2
replace meth_300_mostcomf_Quiz=1 if meth_300_`i'==3
replace meth_300_mostcomf_GroupWork=1 if meth_300_`i'==4
replace meth_300_mostcomf_Games=1 if meth_300_`i'==5
replace meth_300_mostcomf_Discussion=1 if meth_300_`i'==6
replace meth_300_mostcomf_ActOutClass=1 if meth_300_`i'==7
replace meth_300_mostcomf_ReadFromText=1 if meth_300_`i'==8
replace meth_300_mostcomf_PracticeEx=1 if meth_300_`i'==9
replace meth_300_mostcomf_Research=1 if meth_300_`i'==10
replace meth_300_mostcomf_Experiment=1 if meth_300_`i'==11
replace meth_300_mostcomf_Portfolio=1 if meth_300_`i'==12
}
foreach var in meth_300_mostcomf_Portfolio meth_300_mostcomf_PracticeEx meth_300_mostcomf_ActOutClass meth_300_mostcomf_Discussion meth_300_mostcomf_Experiment meth_300_mostcomf_Games meth_300_mostcomf_GroupWork meth_300_mostcomf_Lect meth_300_mostcomf_QandA meth_300_mostcomf_Quiz meth_300_mostcomf_ReadFromText meth_300_mostcomf_Research{
lab var `var' "300_What are the three(3) teaching methods or pedagogies you are most comfortable using?"
lab val `var' yesnolbl
}


order meth_300_mostcomf_Lect meth_300_mostcomf_QandA meth_300_mostcomf_Quiz meth_300_mostcomf_GroupWork meth_300_mostcomf_Games meth_300_mostcomf_Discussion meth_300_mostcomf_ActOutClass meth_300_mostcomf_ReadFromText meth_300_mostcomf_PracticeEx meth_300_mostcomf_Research meth_300_mostcomf_Experiment meth_300_mostcomf_Portfolio, after (meth_300)

forval i=1/3{
drop meth_300_`i'
}

	*301 Least comfortable teaching Methods

split meth_301, parse ("")
rename meth_3011 meth_301_1
rename meth_3012 meth_301_2
rename meth_3013 meth_301_3
/*
destring meth_301_3, replace
#delimit ;
label define meth_301_3lab
1 "Lecture or note taking"
2 "Question & Answer"
3 "Quiz or Exam"
4 "Small Group Work"
5 "Games (e.g. energizers, competitions, cards, etc)"
6 "Class Discussion"
7 "Activities outside of the classroom"
8 "Reading from a text"
9 "Practice exercises" 
10 "Research (use of library or computer)"
11 "Experiment"
12 "Student Portfolio";
#delimit cr

label val meth_301_3 meth_301_3lab
*/

g meth_301_leastcomf_Lect=0 
g meth_301_leastcomf_QandA=0 
g meth_301_leastcomf_Quiz=0 
g meth_301_leastcomf_GroupWork=0 
g meth_301_leastcomf_Games=0 
g meth_301_leastcomf_Discussion=0 
g meth_301_leastcomf_ActOutClass=0 
g meth_301_leastcomf_ReadFromText=0 
g meth_301_leastcomf_PracticeEx=0 
g meth_301_leastcomf_Research=0 
g meth_301_leastcomf_Experiment=0 
g meth_301_leastcomf_Portfolio=0

forval i=1/3{
destring meth_301_`i',replace
replace meth_301_leastcomf_Lect=1 if meth_301_`i'==1
replace meth_301_leastcomf_QandA=1 if meth_301_`i'==2
replace meth_301_leastcomf_Quiz=1 if meth_301_`i'==3
replace meth_301_leastcomf_GroupWork=1 if meth_301_`i'==4
replace meth_301_leastcomf_Games=1 if meth_301_`i'==5
replace meth_301_leastcomf_Discussion=1 if meth_301_`i'==6
replace meth_301_leastcomf_ActOutClass=1 if meth_301_`i'==7
replace meth_301_leastcomf_ReadFromText=1 if meth_301_`i'==8
replace meth_301_leastcomf_PracticeEx=1 if meth_301_`i'==9
replace meth_301_leastcomf_Research=1 if meth_301_`i'==10
replace meth_301_leastcomf_Experiment=1 if meth_301_`i'==11
replace meth_301_leastcomf_Portfolio=1 if meth_301_`i'==12
}
foreach var in meth_301_leastcomf_Portfolio meth_301_leastcomf_PracticeEx meth_301_leastcomf_ActOutClass meth_301_leastcomf_Discussion meth_301_leastcomf_Experiment meth_301_leastcomf_Games meth_301_leastcomf_GroupWork meth_301_leastcomf_Lect meth_301_leastcomf_QandA meth_301_leastcomf_Quiz meth_301_leastcomf_ReadFromText meth_301_leastcomf_Research{
	lab var `var' "301_What are the three(3)teaching methods or pedagogies you are least comfortable using?"
	lab val `var' yesnolbl
	}


order meth_301_leastcomf_Lect meth_301_leastcomf_QandA meth_301_leastcomf_Quiz meth_301_leastcomf_GroupWork meth_301_leastcomf_Games meth_301_leastcomf_Discussion meth_301_leastcomf_ActOutClass meth_301_leastcomf_ReadFromText meth_301_leastcomf_PracticeEx meth_301_leastcomf_Research meth_301_leastcomf_Experiment meth_301_leastcomf_Portfolio, after (meth_301)

forval i=1/3{
	cap drop meth_301_`i'
}


	*302 Methods used in the last e-ship lesson
split meth_302, parse ("")
rename meth_3021 meth_302_1 
rename meth_3022 meth_302_2 
rename meth_3023 meth_302_3 
rename meth_3024 meth_302_4 
rename meth_3025 meth_302_5 
/*
destring meth_302_1, replace
#delimit ;
label define meth_302_1lab
1 "Lecture or note taking"
2 "Question & Answer"
3 "Quiz or Exam"
4 "Small Group Work"
5 "Games (e.g. energizers, competitions, cards, etc)"
6 "Class Discussion"
7 "Activities outside of the classroom"
8 "Reading from a text"
9 "Practice exercises" 
10 "Research (use of library or computer)"
11 "Experiment"
12 "Student Portfolio";
#delimit cr

*label val meth_302_1 meth_302_1lab
*/	
g meth_302_lastused_Lect=0 
g meth_302_lastused_QandA=0 
g meth_302_lastused_Quiz=0 
g meth_302_lastused_GroupWork=0 
g meth_302_lastused_Games=0 
g meth_302_lastused_Discussion=0 
g meth_302_lastused_ActOutClass=0 
g meth_302_lastused_ReadFromText=0 
g meth_302_lastused_PracticeEx=0 
g meth_302_lastused_Research=0 
g meth_302_lastused_Experiment=0 
g meth_302_lastused_Portfolio=0

forval i=1/5{
	destring meth_302_`i',replace
	replace meth_302_lastused_Lect=1 if meth_302_`i'==1
	replace meth_302_lastused_QandA=1 if meth_302_`i'==2
	replace meth_302_lastused_Quiz=1 if meth_302_`i'==3
	replace meth_302_lastused_GroupWork=1 if meth_302_`i'==4
	replace meth_302_lastused_Games=1 if meth_302_`i'==5
	replace meth_302_lastused_Discussion=1 if meth_302_`i'==6
	replace meth_302_lastused_ActOutClass=1 if meth_302_`i'==7
	replace meth_302_lastused_ReadFromText=1 if meth_302_`i'==8
	replace meth_302_lastused_PracticeEx=1 if meth_302_`i'==9
	replace meth_302_lastused_Research=1 if meth_302_`i'==10
	replace meth_302_lastused_Experiment=1 if meth_302_`i'==11
	replace meth_302_lastused_Portfolio=1 if meth_302_`i'==12
	}
foreach var in meth_302_lastused_Portfolio meth_302_lastused_PracticeEx meth_302_lastused_ActOutClass meth_302_lastused_Discussion meth_302_lastused_Experiment meth_302_lastused_Games meth_302_lastused_GroupWork meth_302_lastused_Lect meth_302_lastused_QandA meth_302_lastused_Quiz meth_302_lastused_ReadFromText meth_302_lastused_Research{
	lab var `var' "302_Which of these(3)teaching methods did you use in the last entrepreneurship lesson you taught?"
	lab val `var' yesnolbl
	}


order meth_302_lastused_Lect meth_302_lastused_QandA meth_302_lastused_Quiz meth_302_lastused_GroupWork meth_302_lastused_Games meth_302_lastused_Discussion meth_302_lastused_ActOutClass meth_302_lastused_ReadFromText meth_302_lastused_PracticeEx meth_302_lastused_Research meth_302_lastused_Experiment meth_302_lastused_Portfolio, after (meth_302)

forval i=1/5{
drop meth_302_`i'
}

	*307 Most effective teaching Methods
split meth_307, parse ("")
rename meth_3071 meth_307_1
rename meth_3072 meth_307_2
rename meth_3073 meth_307_3
rename meth_3074 meth_307_4
rename meth_3075 meth_307_5

/*
destring meth_307_1, replace
#delimit ;
label define meth_307_1lab
1 "Lecture or note taking"
2 "Question & Answer"
3 "Quiz or Exam"
4 "Small Group Work"
5 "Games (e.g. energizers, competitions, cards, etc)"
6 "Class Discussion"
7 "Activities outside of the classroom"
8 "Reading from a text"
9 "Practice exercises" 
10 "Research (use of library or computer)"
11 "Experiment"
12 "Student Portfolio";
#delimit cr

label val meth_307_1 meth_307_1lab
*/	
g meth_307_mostef_Lect=0 
g meth_307_mostef_QandA=0 
g meth_307_mostef_Quiz=0 
g meth_307_mostef_GroupWork=0 
g meth_307_mostef_Games=0 
g meth_307_mostef_Discussion=0 
g meth_307_mostef_ActOutClass=0 
g meth_307_mostef_ReadFromText=0 
g meth_307_mostef_PracticeEx=0 
g meth_307_mostef_Research=0 
g meth_307_mostef_Experiment=0 
g meth_307_mostef_Portfolio=0

forval i=1/5{
	destring meth_307_`i',replace
	replace meth_307_mostef_Lect=1 if meth_307_`i'==1
	replace meth_307_mostef_QandA=1 if meth_307_`i'==2
	replace meth_307_mostef_Quiz=1 if meth_307_`i'==3
	replace meth_307_mostef_GroupWork=1 if meth_307_`i'==4
	replace meth_307_mostef_Games=1 if meth_307_`i'==5
	replace meth_307_mostef_Discussion=1 if meth_307_`i'==6
	replace meth_307_mostef_ActOutClass=1 if meth_307_`i'==7
	replace meth_307_mostef_ReadFromText=1 if meth_307_`i'==8
	replace meth_307_mostef_PracticeEx=1 if meth_307_`i'==9
	replace meth_307_mostef_Research=1 if meth_307_`i'==10
	replace meth_307_mostef_Experiment=1 if meth_307_`i'==11
	replace meth_307_mostef_Portfolio=1 if meth_307_`i'==12
	}
foreach var in meth_307_mostef_Portfolio meth_307_mostef_PracticeEx meth_307_mostef_ActOutClass meth_307_mostef_Discussion meth_307_mostef_Experiment meth_307_mostef_Games meth_307_mostef_GroupWork meth_307_mostef_Lect meth_307_mostef_QandA meth_307_mostef_Quiz meth_307_mostef_ReadFromText meth_307_mostef_Research{
	lab var `var' "307_Which five (5) teaching methods do you think are most effective at preparing students to pass exams?"
	lab val `var' yesnolbl
	}


order meth_307_mostef_Lect meth_307_mostef_QandA meth_307_mostef_Quiz meth_307_mostef_GroupWork meth_307_mostef_Games meth_307_mostef_Discussion meth_307_mostef_ActOutClass meth_307_mostef_ReadFromText meth_307_mostef_PracticeEx meth_307_mostef_Research meth_307_mostef_Experiment meth_307_mostef_Portfolio, after (meth_307)

forval i=1/5{
drop meth_307_`i'
}
	*308 Least effective teaching Methods
split meth_308, parse ("")
rename meth_3081 meth_308_1
rename meth_3082 meth_308_2
rename meth_3083 meth_308_3
rename meth_3084 meth_308_4
rename meth_3085 meth_308_5

/*
destring meth_308_1, replace
#delimit ;
label define meth_308_1lab
1 "Lecture or note taking"
2 "Question & Answer"
3 "Quiz or Exam"
4 "Small Group Work"
5 "Games (e.g. energizers, competitions, cards, etc)"
6 "Class Discussion"
7 "Activities outside of the classroom"
8 "Reading from a text"
9 "Practice exercises" 
10 "Research (use of library or computer)"
11 "Experiment"
12 "Student Portfolio";
#delimit cr

label val meth_308_1 meth_308_1lab
*/	
g meth_308_leasttef_Lect=0 
g meth_308_leasttef_QandA=0 
g meth_308_leasttef_Quiz=0 
g meth_308_leasttef_GroupWork=0 
g meth_308_leasttef_Games=0 
g meth_308_leasttef_Discussion=0 
g meth_308_leasttef_ActOutClass=0 
g meth_308_leasttef_ReadFromText=0 
g meth_308_leasttef_PracticeEx=0 
g meth_308_leasttef_Research=0 
g meth_308_leasttef_Experiment=0 
g meth_308_leasttef_Portfolio=0

forval i=1/5{
destring meth_308_`i',replace
	replace meth_308_leasttef_Lect=1 if meth_308_`i'==1
	replace meth_308_leasttef_QandA=1 if meth_308_`i'==2
	replace meth_308_leasttef_Quiz=1 if meth_308_`i'==3
	replace meth_308_leasttef_GroupWork=1 if meth_308_`i'==4
	replace meth_308_leasttef_Games=1 if meth_308_`i'==5
	replace meth_308_leasttef_Discussion=1 if meth_308_`i'==6
	replace meth_308_leasttef_ActOutClass=1 if meth_308_`i'==7
	replace meth_308_leasttef_ReadFromText=1 if meth_308_`i'==8
	replace meth_308_leasttef_PracticeEx=1 if meth_308_`i'==9
	replace meth_308_leasttef_Research=1 if meth_308_`i'==10
	replace meth_308_leasttef_Experiment=1 if meth_308_`i'==11
	replace meth_308_leasttef_Portfolio=1 if meth_308_`i'==12
}
foreach var in meth_308_leasttef_Portfolio meth_308_leasttef_PracticeEx meth_308_leasttef_ActOutClass meth_308_leasttef_Discussion meth_308_leasttef_Experiment meth_308_leasttef_Games meth_308_leasttef_GroupWork meth_308_leasttef_Lect meth_308_leasttef_QandA meth_308_leasttef_Quiz meth_308_leasttef_ReadFromText meth_308_leasttef_Research{
	lab var `var' "308_Which five (5) teaching methods do you think are least effective at preparing students to pass exams?"
	lab val `var' yesnolbl
} 

forval i=1/5{
	drop meth_308_`i'
}
order meth_308_leasttef_Lect meth_308_leasttef_QandA meth_308_leasttef_Quiz meth_308_leasttef_GroupWork meth_308_leasttef_Games meth_308_leasttef_Discussion meth_308_leasttef_ActOutClass meth_308_leasttef_ReadFromText meth_308_leasttef_PracticeEx meth_308_leasttef_Research meth_308_leasttef_Experiment meth_308_leasttef_Portfolio, after (meth_308)

		*309 Teacher's main goal
	
replace goal_teach_309="-66" if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace goal_teach_309="-66" if key=="uuid:59cb4570-b945-4d78-a997-4deb0e57d134"
replace goal_teach_309="-66" if key=="uuid:9721f257-7c79-4b3b-b859-02bbdf4e7d3e"
replace goal_teach_309="-66" if key=="uuid:93c9b2c9-81ff-456e-9283-e40640548d46"
replace goal_teach_309="-66" if key=="uuid:5ee8d2e2-4f07-4ad9-8e29-cc017222b744"
replace goal_teach_309="-66" if key=="uuid:8254f9be-93e1-461e-8a28-43c830a13f4e"
replace goal_teach_309="3" if key=="uuid:81eec131-93ff-4f4d-aa8a-09e70959bb07"
replace goal_teach_309_other="." if key=="uuid:81eec131-93ff-4f4d-aa8a-09e70959bb07"
replace goal_teach_309="." if key=="uuid:a10b71c2-6ed5-48e7-9306-52625f8c7f0e"
replace goal_teach_309="2" if key=="uuid:f9f3d492-3479-4f95-964f-f990dd323b42"
replace goal_teach_309="1" if key=="uuid:5ab17346-b4b8-4d5a-a42b-2b4987f591ab"
replace goal_teach_309="-66" if key=="uuid:2df4cc5c-fbf0-4915-b90c-111689cc7266"
replace goal_teach_309="1" if key=="uuid:c81a0bf4-99a1-4323-b1eb-9d3b39a2fb8e"
replace goal_teach_309_other="." if key=="uuid:c81a0bf4-99a1-4323-b1eb-9d3b39a2fb8e"
replace goal_teach_309="-66" if key=="uuid:3e67d431-2ea3-4b1e-87ee-0747c6d420fc"
replace goal_teach_309="-66" if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace goal_teach_309="1" if key=="uuid:890be4eb-d56d-4536-96c8-83708ba93b5b"
replace goal_teach_309="1" if key=="uuid:58061995-4590-4c88-b773-6dd8c339dd1d"
replace goal_teach_309_other="." if key=="uuid:58061995-4590-4c88-b773-6dd8c339dd1d"
replace goal_teach_309="3" if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"
replace goal_teach_309_other="." if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"
replace goal_teach_309="3" if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
replace goal_teach_309_other="." if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
replace goal_teach_309="-66" if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace goal_teach_309_other="Students' self-development" if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace goal_teach_309="1" if key=="uuid:4d02548c-f3e0-4608-b3b8-cbbdd6260b46"
replace goal_teach_309_other="." if key=="uuid:4d02548c-f3e0-4608-b3b8-cbbdd6260b46"
replace goal_teach_309="-66" if key=="uuid:186bf706-44f4-47a6-9a15-59ddc4cde885"
replace goal_teach_309="3" if key=="uuid:e812903d-3027-49d1-be5c-aa19201a8d5b"
replace goal_teach_309_other="." if key=="uuid:e812903d-3027-49d1-be5c-aa19201a8d5b"
replace goal_teach_309="-66" if key=="uuid:c8b57ca0-8d4b-4a93-8b9e-7f1313b9e3c9"
replace goal_teach_309="1" if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace goal_teach_309_other="." if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace goal_teach_309="1" if key=="uuid:7234f537-7d82-4398-b11a-7805fd3a929d"
replace goal_teach_309_other="." if key=="uuid:7234f537-7d82-4398-b11a-7805fd3a929d"

destring goal_teach_309, replace
#delimit ;
label define goal_teach_309lab
1 "Develop student knowledge"
2 "Develop student skills and attitudes"
3 "Develop student knowledge, skills and attitudes"
-66 "Other";
#delimit cr

label val goal_teach_309 goal_teach_309lab

gsort -goal_teach_309_other
replace goal_teach_309_other="" if goal_teach_309!=.& goal_teach_309!=-66

     *311
replace freq_comp_311=. if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"

     *312 Use of CBC approach
	 
destring learn_comp_312, replace 
replace learn_comp_312="-66" if key=="uuid:84c9b20c-0536-4deb-9af8-74eb260af98e"
replace learn_comp_312="-66" if key=="uuid:2d0a8c36-4d53-465e-a5a9-8a99830ac8f7"
replace learn_comp_312="-66" if key=="uuid:e0abe935-28fd-43e5-8c5b-ec977cd7c439"
replace learn_comp_312="1" if key=="uuid:cd600a6f-84d8-416b-a86c-bceed4e46ff5"
replace learn_comp_312="1" if key=="uuid:e812903d-3027-49d1-be5c-aa19201a8d5b"
replace learn_comp_312_other="." if key=="uuid:e812903d-3027-49d1-be5c-aa19201a8d5b"

destring learn_comp_312, replace
#delimit ;
label define learn_comp_312lab
1 "A REB training"
2 "A training not by REB"
3 "My Headmaster trained me"
4 "A Teacher at my school trained me"
5 "A teacher from another school trained me"
6 "I researched and read to learn it on my own"
7 "I developed my own approach"
-66 "Other";
#delimit cr

label val learn_comp_312 learn_comp_312lab

*313 Main reason for not Using CBC approach

destring reas_313, replace
#delimit ;
label define reas_313lab
1 "Never been trained on it"
2 "Never heard of it"
3 "Dont agree with it"
4 "Have not had time to start using it"
5 "Do not have the materials to use it"
-66 "Other";
#delimit cr

label val reas_313 reas_313lab

*314 Skills Lab

replace skilllab_314=1 if key=="uuid:d043f0eb-7511-44af-bc82-7801817534e8"
replace skilllab_314=1 if key=="uuid:58b6e5d7-84dc-48da-97f7-0a80a9cfd441"
replace skilllab_314=1 if key=="uuid:af245f99-1e92-4990-823a-63207a225aa9"
replace skilllab_314=1 if key=="uuid:c520e356-5190-431e-8bf8-d10286108053"
replace skilllab_314=1 if key=="uuid:89c86086-6449-416f-b1bf-93f04343d9a7"
replace skilllab_314=1 if key=="uuid:41701546-3455-4524-b8b1-8645a5e34345"
replace skilllab_314=1 if key=="uuid:a9ca502c-5f95-42da-a521-83fe8e99d6a1"
replace skilllab_314=1 if key=="uuid:930d147e-0019-4dc0-93e6-0738e2820052"
replace skilllab_314=1 if key=="uuid:acdab979-e3f0-4b8e-80ef-ef954e2a7850"
replace skilllab_314=1 if key=="uuid:703895ee-f92f-4ff4-a194-aa8675fa1bdf"
replace skilllab_314=1 if key=="uuid:332ef801-ee41-4d8d-89dd-293e72e84d8c"
replace skilllab_314=1 if key=="uuid:efb98f62-f809-41d1-99da-d0a93eb08618"
replace skilllab_314=1 if key=="uuid:fa8748f0-6307-4a17-af83-6739ed50015c"
replace skilllab_314=1 if key=="uuid:cc4adc45-ab0e-4eea-ab4c-c930b93fea13"
replace skilllab_314=1 if key=="uuid:54829048-a33e-47c4-93cb-3fc50055d5fc"
replace skilllab_314=1 if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace skilllab_314=1 if key=="uuid:38c36d7b-5735-44d3-9b5f-e501bc551a22"
replace skilllab_314=1 if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace skilllab_314=1 if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"
replace skilllab_314=1 if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
replace skilllab_314=1 if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
replace skilllab_314=1 if key=="uuid:647dcd0e-aecf-4401-8756-f4c449fa83d5"

replace def_skilllab_315=. if key=="uuid:d043f0eb-7511-44af-bc82-7801817534e8"
replace def_skilllab_315=. if key=="uuid:58b6e5d7-84dc-48da-97f7-0a80a9cfd441"
replace def_skilllab_315=. if key=="uuid:8b612907-7f68-4731-84f7-7babb15e58cf"
replace def_skilllab_315=. if key=="uuid:af245f99-1e92-4990-823a-63207a225aa9"
replace def_skilllab_315=. if key=="uuid:c520e356-5190-431e-8bf8-d10286108053"
replace def_skilllab_315=. if key=="uuid:f702cb55-f776-410b-8d18-0cce0d839ac9"
replace def_skilllab_315=. if key=="uuid:6f55eca2-ece2-4aa2-ac10-73d6fb2fac00"
replace def_skilllab_315=. if key=="uuid:f2e8770a-f488-433a-bd57-5dddb3f8b00e"
replace def_skilllab_315=. if key=="uuid:41701546-3455-4524-b8b1-8645a5e34345"
replace def_skilllab_315=. if key=="uuid:a9ca502c-5f95-42da-a521-83fe8e99d6a1"
replace def_skilllab_315=. if key=="uuid:930d147e-0019-4dc0-93e6-0738e2820052"
replace def_skilllab_315=. if key=="uuid:acdab979-e3f0-4b8e-80ef-ef954e2a7850"
replace def_skilllab_315=. if key=="uuid:703895ee-f92f-4ff4-a194-aa8675fa1bdf"
replace def_skilllab_315=. if key=="uuid:332ef801-ee41-4d8d-89dd-293e72e84d8c"
replace def_skilllab_315=. if key=="uuid:efb98f62-f809-41d1-99da-d0a93eb08618"
replace def_skilllab_315=. if key=="uuid:fa8748f0-6307-4a17-af83-6739ed50015c"
replace def_skilllab_315=3 if key=="uuid:33bd67cb-c4c8-4992-9cdb-62f43924c928"
replace def_skilllab_315=. if key=="uuid:cc4adc45-ab0e-4eea-ab4c-c930b93fea13"
replace def_skilllab_315=. if key=="uuid:54829048-a33e-47c4-93cb-3fc50055d5fc"
replace def_skilllab_315=. if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace def_skilllab_315=. if key=="uuid:38c36d7b-5735-44d3-9b5f-e501bc551a22"
replace def_skilllab_315=. if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace def_skilllab_315=. if key=="uuid:f411387a-84fb-4940-a7f6-60762ef86511"
replace def_skilllab_315=. if key=="uuid:ce2e1f42-3e6d-4c54-b64e-719eb3347a37"
replace def_skilllab_315=. if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"
replace def_skilllab_315=. if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
replace def_skilllab_315=-99 if key=="uuid:4d02548c-f3e0-4608-b3b8-cbbdd6260b46"
replace def_skilllab_315=. if key=="uuid:d58cabf5-e4fa-4445-bff0-a941e5e5a998"
replace def_skilllab_315=. if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
replace def_skilllab_315=. if key=="uuid:647dcd0e-aecf-4401-8756-f4c449fa83d5"

	*316 Most effective teaching Methods for E-ship
split meth_316, parse ("")
rename meth_3161 meth_316_1
rename meth_3162 meth_316_2
rename meth_3163 meth_316_3
/*
destring meth_316_1, replace
#delimit ;
label define meth_316_1lab
1 "Lecture or note taking"
2 "Question & Answer"
3 "Quiz or Exam"
4 "Small Group Work"
5 "Games (e.g. energizers, competitions, cards, etc)"
6 "Class Discussion"
7 "Activities outside of the classroom"
8 "Reading from a text"
9 "Practice exercises" 
10 "Research (use of library or computer)"
11 "Experiment"
12 "Student Portfolio";
#delimit cr

label val meth_316_1 meth_316_1lab	
*/	
g meth_316_mostef_Lect=0 
g meth_316_mostef_QandA=0 
g meth_316_mostef_Quiz=0 
g meth_316_mostef_GroupWork=0 
g meth_316_mostef_Games=0 
g meth_316_mostef_Discussion=0 
g meth_316_mostef_ActOutClass=0 
g meth_316_mostef_ReadFromText=0 
g meth_316_mostef_PracticeEx=0 
g meth_316_mostef_Research=0 
g meth_316_mostef_Experiment=0 
g meth_316_mostef_Portfolio=0

forval i=1/3{
	destring meth_316_`i',replace
	replace meth_316_mostef_Lect=1 if meth_316_`i'==1
	replace meth_316_mostef_QandA=1 if meth_316_`i'==2
	replace meth_316_mostef_Quiz=1 if meth_316_`i'==3
	replace meth_316_mostef_GroupWork=1 if meth_316_`i'==4
	replace meth_316_mostef_Games=1 if meth_316_`i'==5
	replace meth_316_mostef_Discussion=1 if meth_316_`i'==6
	replace meth_316_mostef_ActOutClass=1 if meth_316_`i'==7
	replace meth_316_mostef_ReadFromText=1 if meth_316_`i'==8
	replace meth_316_mostef_PracticeEx=1 if meth_316_`i'==9
	replace meth_316_mostef_Research=1 if meth_316_`i'==10
	replace meth_316_mostef_Experiment=1 if meth_316_`i'==11
	replace meth_316_mostef_Portfolio=1 if meth_316_`i'==12
	}
foreach var in meth_316_mostef_Lect meth_316_mostef_Portfolio meth_316_mostef_PracticeEx meth_316_mostef_ActOutClass meth_316_mostef_Discussion meth_316_mostef_Experiment meth_316_mostef_Games meth_316_mostef_GroupWork meth_316_mostef_Lect meth_316_mostef_QandA meth_316_mostef_Quiz meth_316_mostef_ReadFromText meth_316_mostef_Research{
	lab var `var' "316_Which three (5) teaching methods do you think are most effective for teaching entrepreneurship subject?"
	lab val `var' yesnolbl
}
forval i=1/3{
	drop meth_316_`i'
}
order meth_316_mostef_Lect meth_316_mostef_QandA meth_316_mostef_Quiz meth_316_mostef_GroupWork meth_316_mostef_Games meth_316_mostef_Discussion meth_316_mostef_ActOutClass meth_316_mostef_ReadFromText meth_316_mostef_PracticeEx meth_316_mostef_Research meth_316_mostef_Experiment meth_316_mostef_Portfolio, after (meth_316)

	*317 Least effective teaching Methods for E-ship
split meth_317, parse ("")
rename meth_3171 meth_317_1
rename meth_3172 meth_317_2
rename meth_3173 meth_317_3
rename meth_3174 meth_317_4
/*
destring meth_317_1, replace
#delimit ;
label define meth_317_1lab
1 "Lecture or note taking"
2 "Question & Answer"
3 "Quiz or Exam"
4 "Small Group Work"
5 "Games (e.g. energizers, competitions, cards, etc)"
6 "Class Discussion"
7 "Activities outside of the classroom"
8 "Reading from a text"
9 "Practice exercises" 
10 "Research (use of library or computer)"
11 "Experiment"
12 "Student Portfolio";
#delimit cr

label val meth_317_1 meth_317_1lab
*/	
g meth_317_leasttef_Lect=0 
g meth_317_leasttef_QandA=0 
g meth_317_leasttef_Quiz=0 
g meth_317_leasttef_GroupWork=0 
g meth_317_leasttef_Games=0 
g meth_317_leasttef_Discussion=0 
g meth_317_leasttef_ActOutClass=0 
g meth_317_leasttef_ReadFromText=0 
g meth_317_leasttef_PracticeEx=0 
g meth_317_leasttef_Research=0 
g meth_317_leasttef_Experiment=0 
g meth_317_leasttef_Portfolio=0

forval i=1/4{
	destring meth_317_`i',replace
	replace meth_317_leasttef_Lect=1 if meth_317_`i'==1
	replace meth_317_leasttef_QandA=1 if meth_317_`i'==2
	replace meth_317_leasttef_Quiz=1 if meth_317_`i'==3
	replace meth_317_leasttef_GroupWork=1 if meth_317_`i'==4
	replace meth_317_leasttef_Games=1 if meth_317_`i'==5
	replace meth_317_leasttef_Discussion=1 if meth_317_`i'==6
	replace meth_317_leasttef_ActOutClass=1 if meth_317_`i'==7
	replace meth_317_leasttef_ReadFromText=1 if meth_317_`i'==8
	replace meth_317_leasttef_PracticeEx=1 if meth_317_`i'==9
	replace meth_317_leasttef_Research=1 if meth_317_`i'==10
	replace meth_317_leasttef_Experiment=1 if meth_317_`i'==11
	replace meth_317_leasttef_Portfolio=1 if meth_317_`i'==12
}
foreach var in meth_317_leasttef_Lect meth_317_leasttef_Portfolio meth_317_leasttef_PracticeEx meth_317_leasttef_ActOutClass meth_317_leasttef_Discussion meth_317_leasttef_Experiment meth_317_leasttef_Games meth_317_leasttef_GroupWork meth_317_leasttef_Lect meth_317_leasttef_QandA meth_317_leasttef_Quiz meth_317_leasttef_ReadFromText meth_317_leasttef_Research{
	lab var `var' "317_Which three (5) teaching methods do you think are least effective for teaching entrepreneurship subject?"
	lab val `var' yesnolbl
}
forval i=1/4{
	drop meth_317_`i'
}

order meth_317_leasttef_Lect meth_317_leasttef_QandA meth_317_leasttef_Quiz meth_317_leasttef_GroupWork meth_317_leasttef_Games meth_317_leasttef_Discussion meth_317_leasttef_ActOutClass meth_317_leasttef_ReadFromText meth_317_leasttef_PracticeEx meth_317_leasttef_Research meth_317_leasttef_Experiment meth_317_leasttef_Portfolio, after (meth_317)

		*318 Assessing students' skills and attitudes
split assess_318, parse ("")
rename assess_3181 assess_318_1
rename assess_3182 assess_318_2
rename assess_3183 assess_318_3
rename assess_3184 assess_318_4
rename assess_3185 assess_318_5
/*
destring assess_318_1, replace
#delimit ;
label define assess_318_1lab
1 "Assess if students can write the most important notes on the topic" 
2 "Assess how much students memorize for exams"
3 "Assess if students can recall facts taught to them a long time ago"
4 "Assess if students can remember both facts and figures"
5 "Assess if students can answer questions that make them use higher order thinking skills (i.e. apply, analyze)";
#delimit cr

label val assess_318_1 assess_318_1lab
*/
g assess_318_Write=0 
g assess_318_Memorize=0 
g assess_318_Recall=0 
g assess_318_Remember=0 
g assess_318_Answer=0 

forval i=1/5{
	destring assess_318_`i',replace
	replace assess_318_Write=1 if assess_318_`i'==1
	replace assess_318_Memorize=1 if assess_318_`i'==2
	replace assess_318_Recall=1 if assess_318_`i'==3
	replace assess_318_Remember=1 if assess_318_`i'==4
	replace assess_318_Answer=1 if assess_318_`i'==5
}
foreach var in assess_318_Write assess_318_Memorize assess_318_Recall assess_318_Remember assess_318_Answer{
	lab var `var' "318_How do you assess students on their skills and attitudes instead of just their knowledge?"
	lab val `var' yesnolbl
}

forval i=1/5{
	drop assess_318_`i'
}

order assess_318_Write assess_318_Memorize assess_318_Recall assess_318_Remember assess_318_Answer, after (assess_318)

	
	*319 Lesson quality improvement 
split(qual_impr_319),parse("")
rename qual_impr_3191 qual_impr_319_1
rename qual_impr_3192 qual_impr_319_2

replace qual_impr_319_2="-66" if qual_impr_319_2=="other"
replace qual_impr_319_1="" if qual_impr_319_1=="-55"

destring qual_impr_319_1 qual_impr_319_2, replace
/*
destring qual_impr_319_1, replace
#delimit ;
label define qual_impr_319_1lab
1 "With better materials"
2 "With more training"
3 "With more support from my head teacher"
4 "With more time spent on lesson planning"
5 "With more feedback and experience sharing with other teachers"
-66 "Other";
#delimit cr

label val qual_impr_319_1 qual_impr_319lab
*/	
g qual_impr_319_BetterMat=0 
g qual_impr_319_MoreTrain=0 
g qual_impr_319_MoreSuppGov=0 
g qual_impr_319_MoreEffTeacher=0 
g qual_impr_319_MoreFdbk=0 

forval i=1/2{
destring qual_impr_319_`i',replace
replace qual_impr_319_BetterMat=1 if qual_impr_319_`i'==1
replace qual_impr_319_MoreTrain=1 if qual_impr_319_`i'==2
replace qual_impr_319_MoreSuppGov=1 if qual_impr_319_`i'==3
replace qual_impr_319_MoreEffTeacher=1 if qual_impr_319_`i'==4
replace qual_impr_319_MoreFdbk=1 if qual_impr_319_`i'==5
}
foreach var in qual_impr_319_BetterMat qual_impr_319_MoreTrain qual_impr_319_MoreSuppGov qual_impr_319_MoreEffTeacher qual_impr_319_MoreFdbk{
destring `var',replace
lab var `var' "319_How can the quality of lessons at your school be improved?"
lab val `var' yesnolbl
}

forval i=1/2{
drop qual_impr_319_`i'
}

order qual_impr_319_BetterMat qual_impr_319_MoreTrain qual_impr_319_MoreSuppGov qual_impr_319_MoreEffTeacher qual_impr_319_MoreFdbk, before (qual_impr_319)
order qual_impr_319, after(assess_318_Answer)

		*320 Challenges
split(chall_320),parse("")
rename chall_3201 chall_320_1
rename chall_3202 chall_320_2
replace chall_320_1="-66" if chall_320_1=="other"
/*
destring chall_320_1, replace
#delimit ;
label define chall_320_1lab
1 "Low student capacity"
2 "Not enough materials"
3 "Low quality or confusing materials"
4 "Personal lack of knowledge on subject content" 
5 "Personal lack of knowledge on teaching methods or pedagogy" 
6 "Low teacher�s salary/motivation"
7 "Teacher absences" 
8 "English language"
-66 "Other";
#delimit cr

label val chall_320_1 chall_320_1lab
*/		
g chall_320_LowCapa=0 
g chall_320_NoMaterial=0 
g chall_320_LowQualMat=0 
g chall_320_TeachLackCont=0 
g chall_320_TeachLackPedag=0 
g chall_320_TeachLowMotiv=0 
g chall_320_TeachAbsen=0 
g chall_320_TeachEnglish=0 

replace chall_320_2="-66" if chall_320_2=="other"
replace chall_320_2="-66" if chall_320_2=="OTHER"

forval i=1/2{
destring chall_320_`i',replace
replace chall_320_LowCapa=1 if chall_320_`i'==1
replace chall_320_NoMaterial=1 if chall_320_`i'==2
replace chall_320_LowQualMat=1 if chall_320_`i'==3
replace chall_320_TeachLackCont=1 if chall_320_`i'==4
replace chall_320_TeachLackPedag=1 if chall_320_`i'==5
replace chall_320_TeachLowMotiv=1 if chall_320_`i'==6
replace chall_320_TeachAbsen=1 if chall_320_`i'==7
replace chall_320_TeachEnglish=1 if chall_320_`i'==8
}
foreach var in chall_320_LowCapa chall_320_NoMaterial chall_320_LowQualMat chall_320_TeachLackCont chall_320_TeachLackPedag chall_320_TeachLowMotiv chall_320_TeachAbsen chall_320_TeachEnglish{
lab var `var' "320_What are the biggest challenges in trying to teach good lessons?"
lab val `var' yesnolbl
}

forval i=1/2{
drop chall_320_`i'
}

order chall_320_LowCapa chall_320_NoMaterial chall_320_LowQualMat chall_320_TeachLackCont chall_320_TeachLackPedag chall_320_TeachLowMotiv chall_320_TeachAbsen chall_320_TeachEnglish, before (chall_320)
order chall_320, after(qual_impr_319_other)


	*321 Materials avaialable for new CBC
split(mat_321),parse("")
rename mat_3211 mat_321_1
rename mat_3212 mat_321_2
rename mat_3213 mat_321_3
rename mat_3214 mat_321_4
rename mat_3215 mat_321_5

replace mat_321_1="-66" if mat_321_1=="other"
replace mat_321_2="-66" if mat_321_2=="other"
replace mat_321_3="-66" if mat_321_3=="other"
/*
destring mat_321_1, replace
#delimit ;
label define mat_321_1lab
1 "Syllabus"
2 "Teacher�s Guide"
3 "Learner�s Guide / Textbook"
4 "Notes based on the syllabus"
5 "Lesson plans based on the syllabus"
6 "Nothing"
-66 "Other"; 
#delimit cr

label val mat_321_1 mat_321_1lab
*/
g mat_321_Syllab=0 
g mat_321_TeacherGuide=0 
g mat_321_LearnerGuide=0 
g mat_321_NotesOnSyllab=0 
g mat_321_LessPlans=0 
g mat_321_Nothing=0 

forval i=1/5{
destring mat_321_`i',replace
replace mat_321_Syllab=1 if mat_321_`i'==1
replace mat_321_TeacherGuide=1 if mat_321_`i'==2
replace mat_321_LearnerGuide=1 if mat_321_`i'==3
replace mat_321_NotesOnSyllab=1 if mat_321_`i'==4
replace mat_321_LessPlans=1 if mat_321_`i'==5
replace mat_321_Nothing=1 if mat_321_`i'==6
}
foreach var in mat_321_Syllab mat_321_TeacherGuide mat_321_LearnerGuide mat_321_NotesOnSyllab mat_321_LessPlans mat_321_Nothing{
lab var `var' "321_What materials do you have for the new Competence-based curriculum?"
lab val `var' yesnolbl
}

forval i=1/5{
drop mat_321_`i'
}

order mat_321_Syllab mat_321_TeacherGuide mat_321_LearnerGuide mat_321_NotesOnSyllab mat_321_LessPlans mat_321_Nothing, after (mat_321)


* SECTION 4. E-SHIP CURRICULUM

	*400 Applying marketing skills
split(mrktskl_400),parse("")
rename mrktskl_4001 mrktskl_400_1
rename mrktskl_4002 mrktskl_400_2
rename mrktskl_4003 mrktskl_400_3
rename mrktskl_4004 mrktskl_400_4
rename mrktskl_4005 mrktskl_400_5

/*
#delimit ;
label define mrktskl_400_1lab
1 "Develop Product Brand"
2 "Advertise"
3 "Keeping Accounts" 
4 "Business registration"
5 "Verbal promotion to potential    customers";
#delimit cr

label val mrktskl_400_1 mrktskl_400_1lab
*/
local item1 "DevProBrand Advert KeepingAccount BusinessReg VerbalProm"
foreach t in `item1'{
	gen mrktskl_400_`t'=0
	lab variable mrktskl_400_`t' "400_How should students apply marketing skills in their school business club?"
	lab value mrktskl_400_`t' yesnolbl
	}
foreach var in mrktskl_400_1 mrktskl_400_2 mrktskl_400_3 mrktskl_400_4 mrktskl_400_5{
	destring `var',replace
	replace mrktskl_400_DevProBrand=1 if `var'==1
	replace mrktskl_400_Advert=1 if `var'==2
	replace mrktskl_400_KeepingAccount=1 if `var'==3
	replace mrktskl_400_BusinessReg=1 if `var'==4
	replace mrktskl_400_VerbalProm=1 if `var'==5 	
	}
forval l=1/5{
	drop mrktskl_400_`l'
	}
order mrktskl_400_*, after(mrktskl_400)


	*401 Elements of Business plan
split(busplnskl_401),parse("")
rename busplnskl_4011 busplnskl_401_1
rename busplnskl_4012 busplnskl_401_2
rename busplnskl_4013 busplnskl_401_3
rename busplnskl_4014 busplnskl_401_4
rename busplnskl_4015 busplnskl_401_5
/*
#delimit ;
label define busplnskl_401_1lab
1 "Business name"
2 "Receipts from sales"
3 "Marketing Plan"
4 "Profit & Loss Statement"
5 "Audit";
#delimit cr

label val busplnskl_401_1 busplnskl_401_1lab
*/
	
local item2 "BusiName ReceiFromSales MarketgPlan PandLStatemt Audit "
foreach t in `item2'{
	gen busplnskl_401_`t'=0
	lab variable busplnskl_401_`t' "401_What should be included in your business plan?"
	lab value busplnskl_401_`t' yesnolbl
	}
foreach var in busplnskl_401_1 busplnskl_401_2 busplnskl_401_3 busplnskl_401_4 busplnskl_401_5{
	destring `var',replace
	replace busplnskl_401_BusiName=1 if `var'==1
	replace busplnskl_401_ReceiFromSales=1 if `var'==2
	replace busplnskl_401_MarketgPlan=1 if `var'==3
	replace busplnskl_401_PandLStatemt=1 if `var'==4
	replace busplnskl_401_Audit=1 if `var'==5
	}
forval l=1/5{
	drop busplnskl_401_`l'
	}
order busplnskl_401_* , before(proftamt_402)

	*403 Ability to increase monthly profit
	
split(incrproft_403),parse("")
rename incrproft_4031 incrproft_403_1
rename incrproft_4032 incrproft_403_2
rename incrproft_4033 incrproft_403_3
rename incrproft_4034 incrproft_403_4
/*
destring incrproft_403_1, replace
#delimit ;
label define incrproft_403_1lab
1 "Sell more paper bags daily"
2 "Increase the price of the paper bags"
3 "Employ someone make the paper bags for you"
4 "Use cheaper materials to make the bags";
#delimit cr

label val incrproft_403_1 incrproft_403_1lab
*/
local item3 "SellMorePaper IncreasPrice EmploySone UseCheaperMat"
foreach t in `item3'{
	gen incrproft_403_`t'=0
	lab variable incrproft_403_`t' "403_In the above example from question 1002, how would you be able to increase"
	lab value incrproft_403_`t' yesnolbl
	}
foreach var in incrproft_403_1 incrproft_403_2 incrproft_403_3 incrproft_403_4 {
	destring `var',replace
	replace incrproft_403_SellMorePaper=1 if `var'==1
	replace incrproft_403_IncreasPrice=1 if `var'==2
	replace incrproft_403_EmploySone=1 if `var'==3
	replace incrproft_403_UseCheaperMat=1 if `var'==4
	}
forval l=1/4{
	drop incrproft_403_`l'
	}
order incrproft_403_* , after(proftamt_402)
	
*sum #Check below
/*Cheched by JB!
The answer was -55
*/

     *404
replace notbusgrth_404=. if key=="uuid:10510f32-937e-43aa-86e9-6bde669b52c0"


* SECTION 5. JOB DUTIES

	*500
destring reas_500, replace 
replace reas_500="." if key=="uuid:5da2457a-23dd-4e5e-bb11-0cdccc1b7861"
replace reas_500="-66" if key=="uuid:14213134-aa48-4be1-93a7-2bf6cd014b26"
replace reas_500="." if key=="uuid:045ffebc-2461-4198-8ca4-64bea9903a85"
replace reas_500="." if key=="uuid:b918e507-e35d-4a29-9ee4-8abb5e0b0894"
replace reas_500="." if key=="uuid:a1393010-9ef5-4586-bcd9-c7f00e3637af"
replace reas_500="." if key=="uuid:bb35e662-6d9e-4582-b67d-72a77edf4b2c"
replace reas_500="." if key=="uuid:0f014855-81c0-413b-a01a-ee4b61be1dd0"
replace reas_500="." if key=="uuid:c9753657-eb30-4b37-84f3-f299ce3dcc6b"
replace reas_500="." if key=="uuid:fdde786f-7f4e-4855-9d2c-a5ae99c2378c"
replace reas_500="." if key=="uuid:6956187d-150c-4e77-9f09-bc61cc4292e2"
replace reas_500="." if key=="uuid:9a03d7bb-32be-4013-96fc-711a80b0e5ae"
replace reas_500="." if key=="uuid:2422a1c1-e442-42c6-ab3e-ede87ebce290"
replace reas_500="." if key=="uuid:84c9b20c-0536-4deb-9af8-74eb260af98e"
replace reas_500="." if key=="uuid:f8c744e1-2768-4fce-b811-5c2f0658f6e8"
replace reas_500="." if key=="uuid:9721f257-7c79-4b3b-b859-02bbdf4e7d3e"
replace reas_500="." if key=="uuid:1dc0124e-2f1f-4ab2-a2a1-6d600cea1020"
replace reas_500="." if key=="uuid:38d288bf-047b-49b2-9c88-15f4d5283e30"
replace reas_500="." if key=="uuid:2de406d8-0dfb-4016-80b6-541dd4491db5"
replace reas_500="." if key=="uuid:8b612907-7f68-4731-84f7-7babb15e58cf"
replace reas_500="." if key=="uuid:5203694d-0eb4-4de9-8df9-dda890bda576"
replace reas_500="." if key=="uuid:ca07c2c5-ee65-4b3e-a5f7-9d29d5fdfaef"
replace reas_500="." if key=="uuid:d043f0eb-7511-44af-bc82-7801817534e8"
replace reas_500="." if key=="uuid:58b6e5d7-84dc-48da-97f7-0a80a9cfd441"
replace reas_500="." if key=="uuid:e1d170d7-c34c-4783-83d3-eb38922d2019"
replace reas_500="." if key=="uuid:cc879384-95db-482a-b9fd-0e0869d6f1fb"
replace reas_500="." if key=="uuid:fb7bc230-3cfa-4af8-a445-03ffc329e3f6"
replace reas_500="." if key=="uuid:d9c5494e-9b1e-48df-97a3-41db8f95a04d"
replace reas_500="-66" if key=="uuid:9fb7f00a-1684-4141-bd89-6973d1174dec"
replace reas_500="-66" if key=="uuid:1cbc07e7-ab2e-4b26-bc09-35c05f741b79"
replace reas_500="." if key=="uuid:1d39600c-54bf-471f-be2b-034f559820fb"
replace reas_500="." if key=="uuid:6e76b875-fba0-4d2d-887c-f8cd76409d5e"
replace reas_500="." if key=="uuid:ea588995-0147-4cca-a631-0c5609fef3b8"
replace reas_500="." if key=="uuid:4005f158-d2fc-45f9-8313-f395c1475519"
replace reas_500="." if key=="uuid:1eb15716-47b2-44bb-88ef-b6d79c7f872d"
replace reas_500="." if key=="uuid:18be3b19-e740-4732-ba3a-09211cdf2fb6"
replace reas_500="-66" if key=="uuid:ddc5a900-0e3d-49cf-a9e2-8471841cbb1b"
replace reas_500="." if key=="uuid:5ee8d2e2-4f07-4ad9-8e29-cc017222b744"
replace reas_500="." if key=="uuid:e88b9b18-1d83-429e-b4d2-51cd48d45be6"
replace reas_500="." if key=="uuid:b49e0dbb-f308-454f-a46b-d0de6fd94742"
replace reas_500="-66" if key=="uuid:62573913-709a-4e43-9889-3e5b009e48d3"
replace reas_500="." if key=="uuid:684b67b1-7a55-4be4-b0ca-d64d517e7efd"
replace reas_500="." if key=="uuid:8e130d16-8f38-4d3d-a09e-7a0359786068"
replace reas_500="." if key=="uuid:1f6538dc-71cd-4684-92cb-3ce62199e0c4"
replace reas_500="-66" if key=="uuid:6ac5859a-3809-4c6f-a56d-b24db2ac697c"
replace reas_500="." if key=="uuid:9bb52034-83b3-4ebd-8f2c-c7eca9793e66"
replace reas_500="." if key=="uuid:8254f9be-93e1-461e-8a28-43c830a13f4e"
replace reas_500="." if key=="uuid:af245f99-1e92-4990-823a-63207a225aa9"
replace reas_500="." if key=="uuid:c520e356-5190-431e-8bf8-d10286108053"
replace reas_500="." if key=="uuid:599ed820-3a41-42cd-8d81-200eee9cd6ed"
replace reas_500="-66" if key=="uuid:3861b74a-1dca-415d-a542-a3f4a8d4dcb5"
replace reas_500="." if key=="uuid:37b252d7-d8de-4d20-a4c1-e843660a58a9"
replace reas_500="." if key=="uuid:6f55eca2-ece2-4aa2-ac10-73d6fb2fac00"
replace reas_500="." if key=="uuid:3a59e989-fd54-4871-a5a6-1b81a870ee41"
replace reas_500="-66" if key=="uuid:89c86086-6449-416f-b1bf-93f04343d9a7"
replace reas_500="." if key=="uuid:067dafab-899f-4ae4-b383-c0f7e102aeb2"
replace reas_500="." if key=="uuid:ded79d66-82f7-4281-be9f-ac17274d8a32"
replace reas_500="." if key=="uuid:dd6841c7-0675-4ead-abfe-19ed4c2cc0f9"
replace reas_500="." if key=="uuid:8599f2d0-b681-45c4-890e-32d07644db81"
replace reas_500="." if key=="uuid:6d304d53-2dab-49b2-b27e-d5d5af3d59f1"
replace reas_500="-66" if key=="uuid:241921c1-9628-4e2c-a652-49338ec1c09d"
replace reas_500="." if key=="uuid:f2e8770a-f488-433a-bd57-5dddb3f8b00e"
replace reas_500="." if key=="uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100"
replace reas_500="." if key=="uuid:41701546-3455-4524-b8b1-8645a5e34345"
replace reas_500="." if key=="uuid:4ebf8413-b7aa-424d-af7c-63606fde3751"
replace reas_500="." if key=="uuid:4ae71431-1c63-42e5-b31d-513bc11fb27d"
replace reas_500="." if key=="uuid:a9ca502c-5f95-42da-a521-83fe8e99d6a1"
replace reas_500="." if key=="uuid:ef15568f-bf30-4c2c-97c9-5c2ae18d4a40"
replace reas_500="." if key=="uuid:f33a0cdb-70d0-4ee2-88eb-a6a47a812c5a"
replace reas_500="." if key=="uuid:930d147e-0019-4dc0-93e6-0738e2820052"
replace reas_500="-66" if key=="uuid:81eec131-93ff-4f4d-aa8a-09e70959bb07"
replace reas_500="-66" if key=="uuid:acdab979-e3f0-4b8e-80ef-ef954e2a7850"
replace reas_500="-66" if key=="uuid:10d7e455-b4f3-429e-bcbe-9385dbdbf815"
replace reas_500="-66" if key=="uuid:b5febac2-7c5f-4d47-9a03-3f03075c8a2d"
replace reas_500="." if key=="uuid:703895ee-f92f-4ff4-a194-aa8675fa1bdf"
replace reas_500="." if key=="uuid:b55b68b8-4e60-4ec7-b042-f8ed70161a34"
replace reas_500="." if key=="uuid:f4b94c4d-95b6-4fe7-bd20-31f1468a192b"
replace reas_500="." if key=="uuid:3934da24-721f-4c78-9ec8-18bcb7309e4a"
replace reas_500="." if key=="uuid:71758029-7b28-41bc-9b72-0cee6aa394d9"
replace reas_500="." if key=="uuid:332ef801-ee41-4d8d-89dd-293e72e84d8c"
replace reas_500="." if key=="uuid:0051f991-17cb-4c3b-b03a-38ea85650a85"
replace reas_500="." if key=="uuid:6e24ba7a-7b91-4022-8db2-1c5418ec5ac5"
replace reas_500="." if key=="uuid:efb98f62-f809-41d1-99da-d0a93eb08618"
replace reas_500="." if key=="uuid:7ed83939-4dc4-40dd-8431-9b917f8fb7d0"
replace reas_500="." if key=="uuid:7a6ae7b4-c5ae-49c3-ab7e-7dc97440f517"
replace reas_500="." if key=="uuid:ea226c92-d416-464e-8de5-d5d4f7e090f3"
replace reas_500="." if key=="uuid:9164ac60-ca36-455a-b8d0-a923e5e74bc9"
replace reas_500="." if key=="uuid:fa8748f0-6307-4a17-af83-6739ed50015c"
replace reas_500="-66" if key=="uuid:14a233cd-de58-4fce-a84b-7af388aa595d"
replace reas_500="-66" if key=="uuid:b574f054-ae19-4db9-8642-04374ac8ed86"
replace reas_500="-66" if key=="uuid:fdcf4dfe-21f3-4c14-b28a-4414937e226b"
replace reas_500="." if key=="uuid:5885d12a-9217-4ba9-b0e6-3a7c23367d7f"
replace reas_500="." if key=="uuid:0937c23e-a48b-4784-a744-fb55e3a12c5a"
replace reas_500="." if key=="uuid:a10b71c2-6ed5-48e7-9306-52625f8c7f0e"
replace reas_500="-66" if key=="uuid:c63e401c-1eba-4ca4-850f-5de40befb0ef"
replace reas_500="." if key=="uuid:4e5f9443-2cae-4995-ae51-308ef1df4f74"
replace reas_500="-66" if key=="uuid:b62667c2-edc0-4394-900f-bee0b1989b02"
replace reas_500="." if key=="uuid:95674371-81f4-4c88-83bf-d4b0a7489c47"
replace reas_500="-66" if key=="uuid:33bd67cb-c4c8-4992-9cdb-62f43924c928"
replace reas_500="." if key=="uuid:f9f3d492-3479-4f95-964f-f990dd323b42"
replace reas_500="." if key=="uuid:f59298f9-6510-41df-8f2d-a6e3bdfb3611"
replace reas_500="." if key=="uuid:cc4adc45-ab0e-4eea-ab4c-c930b93fea13"
replace reas_500="-66" if key=="uuid:5ab17346-b4b8-4d5a-a42b-2b4987f591ab"
replace reas_500="." if key=="uuid:a7e546dd-894d-4cfa-a68b-74449c3833c2"
replace reas_500="." if key=="uuid:2df4cc5c-fbf0-4915-b90c-111689cc7266"
replace reas_500="." if key=="uuid:bb425648-156c-4369-96c0-81f84f599d9f"
replace reas_500="." if key=="uuid:8d884232-390e-472c-aa18-9ffd71b19fc6"
replace reas_500="." if key=="uuid:c81a0bf4-99a1-4323-b1eb-9d3b39a2fb8e"
replace reas_500="." if key=="uuid:f6fecc71-6940-49e5-b97d-2d4046383414"
replace reas_500="." if key=="uuid:e0abe935-28fd-43e5-8c5b-ec977cd7c439"
replace reas_500="." if key=="uuid:97ec001b-1154-4355-bef7-0b460745bd7b"
replace reas_500="-66" if key=="uuid:5a381c4d-1b9a-4c9b-862e-b0193ccef6d2"
replace reas_500="." if key=="uuid:31a93988-6762-4f27-99c8-f6a19655642d"
replace reas_500="." if key=="uuid:54829048-a33e-47c4-93cb-3fc50055d5fc"
replace reas_500="." if key=="uuid:3e67d431-2ea3-4b1e-87ee-0747c6d420fc"
replace reas_500="." if key=="uuid:aeb61d3e-44fe-4990-b679-e0f64ca7954a"
replace reas_500="." if key=="uuid:b13d8be3-a73e-4d07-9d48-70d28e6719b8"
replace reas_500="." if key=="uuid:24dd1097-9fbb-4b82-9086-d215c442c6f3"
replace reas_500="-66" if key=="uuid:11b810b2-7633-40ae-b851-ea40b37a8383"
replace reas_500="." if key=="uuid:cd1e85a0-229f-4791-bdcb-3df231111b80"
replace reas_500="." if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace reas_500="." if key=="uuid:38c36d7b-5735-44d3-9b5f-e501bc551a22"
replace reas_500="." if key=="uuid:164b17b2-7627-4441-b21c-81fe95c5bcf7"
replace reas_500="." if key=="uuid:d49bd34f-dccd-41c5-a194-2d6bf4e1bda2"
replace reas_500="." if key=="uuid:9dce7ea6-e0a7-4cb4-b612-d30b4984489d"
replace reas_500="." if key=="uuid:dfe174b8-491d-4537-902f-1c51138b281f"
replace reas_500="." if key=="uuid:0ddd9118-9608-41f7-8d87-c5ca4fdda487"
replace reas_500="." if key=="uuid:f728c98e-aa9c-4444-87d7-41ad29061d60"
replace reas_500="-66" if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace timesaway_500=. if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace reas_500="-66" if key=="uuid:890be4eb-d56d-4536-96c8-83708ba93b5b"
replace reas_500="." if key=="uuid:4a2cebf6-8dc0-4ca6-bb6f-adba52cac9f7"
replace reas_500="." if key=="uuid:571f7949-fadc-471f-8de4-9160b67f20e0"
replace reas_500="." if key=="uuid:cd600a6f-84d8-416b-a86c-bceed4e46ff5"
replace reas_500="-66" if key=="uuid:225fc8ea-722c-43a4-b29a-a09c1a2a810a"
replace reas_500="." if key=="uuid:9f2846e5-3186-4a27-bcbb-83898a975227"
replace reas_500="." if key=="uuid:58061995-4590-4c88-b773-6dd8c339dd1d"
replace reas_500="." if key=="uuid:f411387a-84fb-4940-a7f6-60762ef86511"
replace reas_500="." if key=="uuid:ce2e1f42-3e6d-4c54-b64e-719eb3347a37"
replace reas_500="-66" if key=="uuid:a4bc574f-2b9a-49ea-9687-be46899e2dfd"
replace reas_500="." if key=="uuid:10510f32-937e-43aa-86e9-6bde669b52c0"
replace reas_500="." if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
replace reas_500="." if key=="uuid:e46ca8ee-ae3a-4acb-8038-c9d47bba3514"
replace reas_500="." if key=="uuid:8942a8f7-2571-413a-a50b-162f8f286176"
replace reas_500="." if key=="uuid:77447f4d-38f2-43e1-b352-84a89f0d3f5a"
replace reas_500="." if key=="uuid:4d02548c-f3e0-4608-b3b8-cbbdd6260b46"
replace reas_500="." if key=="uuid:d61fa246-a24f-449c-bf7f-d6798ddb1311"
replace reas_500="-66" if key=="uuid:d58cabf5-e4fa-4445-bff0-a941e5e5a998"
replace reas_500="." if key=="uuid:c5987cd3-2cfc-43c7-8f5d-25fce77396da"
replace reas_500="." if key=="uuid:52a8675c-6991-424a-8a7e-d1945be120b5"
replace reas_500="." if key=="uuid:9f214da2-771c-4ef8-9ffd-27f8dfbcfccc"
replace reas_500="." if key=="uuid:186bf706-44f4-47a6-9a15-59ddc4cde885"
replace reas_500="." if key=="uuid:a4797132-b679-417e-933e-48cf1ae2f080"
replace reas_500="." if key=="uuid:5da05be0-2495-46b6-9277-705783104ac5"
replace reas_500="." if key=="uuid:22cbf7e5-2410-4280-a3ae-1dba052753d8"
replace reas_500="." if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
replace reas_500="." if key=="uuid:ecfab070-5ee5-4981-9ca6-1c1879f2b297"
replace reas_500="." if key=="uuid:0d70ef15-25b8-4139-b890-f55bf0abb6c6"
replace reas_500="." if key=="uuid:95712d53-7478-4b9d-9b09-f0b9444da1f5"
replace reas_500="." if key=="uuid:b9864580-4d1e-41fa-9889-4347bff583ca"
replace reas_500="." if key=="uuid:55a254bf-b76b-4207-af5b-42d546a4dd0c"
replace reas_500="." if key=="uuid:f7d8b31e-c10c-47ad-9810-4e24ed640c7d"
replace away_500=0 if key=="uuid:4e82294b-bf9c-4af7-a9c3-be9d9b8982c1"
replace reas_500="." if key=="uuid:4e82294b-bf9c-4af7-a9c3-be9d9b8982c1"
replace reas_500="." if key=="uuid:028c65a0-228a-418e-a1bf-95d4c87a8763"
replace reas_500="." if key=="uuid:e812903d-3027-49d1-be5c-aa19201a8d5b"
replace away_500=0 if key=="uuid:8f27122e-aad0-46ec-aca9-5e7a0f006534"
replace reas_500="." if key=="uuid:8f27122e-aad0-46ec-aca9-5e7a0f006534"
replace reas_500="." if key=="uuid:4d7c7114-dfba-409c-8547-a5d2567e0969"
replace reas_500="." if key=="uuid:c5724663-d027-44ca-9f51-8fa5faab0d59"
replace reas_500="." if key=="uuid:647dcd0e-aecf-4401-8756-f4c449fa83d5"
replace reas_500="." if key=="uuid:c93948d5-e360-4413-b0a9-ea9b5e58c3da"
replace reas_500="-66" if key=="uuid:c8b57ca0-8d4b-4a93-8b9e-7f1313b9e3c9"
replace reas_500="-66" if key=="uuid:82c7e83f-9e0c-411e-8708-e8fb808bd078"
replace reas_500="." if key=="uuid:1eaa9648-5b35-490c-a723-5248e3a46de1"
replace reas_500="." if key=="uuid:73a7c9ec-a25d-4ca3-8e8f-aed2926b5343"
replace reas_500="." if key=="uuid:fac78d8a-65bd-497f-a10b-77c24b5bab1c"
replace reas_500="." if key=="uuid:858f1f67-5a93-4dd4-8b97-d49a62b453e1"
replace reas_500="." if key=="uuid:ed79b9c6-462d-46f8-9b26-e5642318f83e"
replace reas_500="." if key=="uuid:7234f537-7d82-4398-b11a-7805fd3a929d"
replace reas_500="." if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"
replace reas_500="." if key=="uuid:672dc92c-79a0-4487-bc23-5d5bb50b5f5e"
replace reas_500="." if key=="uuid:6ee4d3d9-2782-4058-a26c-5c6115bbba61"

replace away_500=. if key=="uuid:c9753657-eb30-4b37-84f3-f299ce3dcc6b"
replace timesaway_500=. if key=="uuid:4e5f9443-2cae-4995-ae51-308ef1df4f74"

*replace away_500=0 if away_500==.
*replace away_500=0 if timesaway_500==. & reas_500==.
replace timesaway_500=. if timesaway_500==-55

destring reas_500, replace 
#delimit ;
label define reas_500lab
1 "School Closed"
2 "REB Training"
3 "Training (not by REB)"
4 "Events & Functions"
5 "Official School Business"
6 "Personal Reasons"
-66 "Other";
#delimit cr

label val reas_500 reas_500lab

	*501

replace hrsaway_501=-77 if key=="uuid:1d39600c-54bf-471f-be2b-034f559820fb"
replace hrsaway_501=-77 if key=="uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100"
replace hrsaway_501=. if key=="uuid:8f27122e-aad0-46ec-aca9-5e7a0f006534"
replace hrsaway_501=-77 if key=="uuid:4d7c7114-dfba-409c-8547-a5d2567e0969"
replace hrsaway_501=. if hrsaway_501==-55

   *502
replace activ1_502=. if activ1_502==-55
replace activ2_502=. if activ2_502==-55
replace activ3_502=. if activ3_502==-55
replace activ4_502=. if activ4_502==-55
replace activ5_502=. if activ5_502==-55
replace activ6_502=. if activ6_502==-55
replace activ7_502=. if activ7_502==-55
replace activ8_502=. if activ8_502==-55
replace activ9_502=. if activ9_502==-55
replace other_spec="." if other_spec=="-55"

   *503
*Here, the timeoth_503=-55 (No answer) was treated as missing value (.) so that it dpesn't show up as valid case during analysis
*If the answer was -77 (N/A), it was given 0
replace timeoth_503=. if key=="uuid:bb35e662-6d9e-4582-b67d-72a77edf4b2c"
replace timeoth_503=. if key=="uuid:fdde786f-7f4e-4855-9d2c-a5ae99c2378c"
replace timeoth_503=. if key=="uuid:59cb4570-b945-4d78-a997-4deb0e57d134"
replace timeoth_503=. if key=="uuid:0ef8a074-9a92-4a95-965a-3fa8b53a1d09"
replace timeoth_503=. if key=="uuid:58b6e5d7-84dc-48da-97f7-0a80a9cfd441"
replace timeoth_503=. if key=="uuid:ea588995-0147-4cca-a631-0c5609fef3b8"
replace timeoth_503=. if key=="uuid:18be3b19-e740-4732-ba3a-09211cdf2fb6"
replace timeoth_503=. if key=="uuid:b49e0dbb-f308-454f-a46b-d0de6fd94742"
replace timeoth_503=. if key=="uuid:1f6538dc-71cd-4684-92cb-3ce62199e0c4"
replace timeoth_503=. if key=="uuid:599ed820-3a41-42cd-8d81-200eee9cd6ed"
replace timeoth_503=. if key=="uuid:720b8cd8-8095-4132-b73f-ef9e1328ca52"
replace timeoth_503=. if key=="uuid:37b252d7-d8de-4d20-a4c1-e843660a58a9"
replace timeoth_503=. if key=="uuid:429cb933-2b4a-4ca4-9d99-2ee7ef5eb0c2"
replace timeoth_503=. if key=="uuid:067dafab-899f-4ae4-b383-c0f7e102aeb2"
replace timeoth_503=. if key=="uuid:f2e8770a-f488-433a-bd57-5dddb3f8b00e"
replace timeoth_503=. if key=="uuid:930d147e-0019-4dc0-93e6-0738e2820052"
replace timeoth_503=0 if key=="uuid:ea226c92-d416-464e-8de5-d5d4f7e090f3"
replace timeoth_503=. if key=="uuid:97ec001b-1154-4355-bef7-0b460745bd7b"
replace timeoth_503=. if key=="uuid:aeb61d3e-44fe-4990-b679-e0f64ca7954a"
replace timeoth_503=0 if key=="uuid:cd1e85a0-229f-4791-bdcb-3df231111b80"
replace timeoth_503=. if key=="uuid:571f7949-fadc-471f-8de4-9160b67f20e0"
replace timeoth_503=. if key=="uuid:225fc8ea-722c-43a4-b29a-a09c1a2a810a"
replace timeoth_503=. if key=="uuid:7b50a980-0652-4c88-8c21-8416f1d0ec38"
replace timeoth_503=. if key=="uuid:00785147-8d55-49d8-84c0-9fbc1723fd32"
replace timeoth_503=. if key=="uuid:58061995-4590-4c88-b773-6dd8c339dd1d"
replace timeoth_503=. if key=="uuid:f411387a-84fb-4940-a7f6-60762ef86511"
replace timeoth_503=. if key=="uuid:983f6eb0-c667-46a4-a689-087bac9ffe09"
replace timeoth_503=. if key=="uuid:ecfab070-5ee5-4981-9ca6-1c1879f2b297"
replace timeoth_503=. if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"


	*504
foreach var in reas1_504 reas2_504 reas3_504 reas4_504 reas5_504 reas6_504 reas7_504 reas8_504{
replace `var'=. if `var'==-55|`var'==55
replace `var'=0 if `var'==-77 // 77 replaced as 0
}
	
	*503
*Here, timeoth_503=-77 (N/A), I thought it meant s/he had never substituted other teacher(s). The -77 is replaced by zero (0)
replace timeoth_503=0 if key=="uuid:c9753657-eb30-4b37-84f3-f299ce3dcc6b"
replace timeoth_503=. if key=="uuid:0ef8a074-9a92-4a95-965a-3fa8b53a1d09"
	*505
	
replace nonteach_505=0 if nonteach_505==-77
	
	*507
*sum #Check below & write in another dofile the date //as* in the Qre
*Checked by JB!
gen come_507=cofC(parentcome_507)
gsort -parentcome_507
replace parentcome_507=20513 if key=="uuid:fb7bc230-3cfa-4af8-a445-03ffc329e3f6"
replace parentcome_507=20508 if key=="uuid:ded79d66-82f7-4281-be9f-ac17274d8a32"
replace parentcome_507=20487 if key=="uuid:3934da24-721f-4c78-9ec8-18bcb7309e4a"
replace parentcome_507=20487 if key=="uuid:890be4eb-d56d-4536-96c8-83708ba93b5b"
replace parentcome_507=20487 if key=="uuid:4d7c7114-dfba-409c-8547-a5d2567e0969"
replace parentcome_507=20487 if key=="uuid:f7d8b31e-c10c-47ad-9810-4e24ed640c7d"
replace parentcome_507=20362 if key=="uuid:5203694d-0eb4-4de9-8df9-dda890bda576"
replace parentcome_507=20516 if key=="uuid:b574f054-ae19-4db9-8642-04374ac8ed86"
replace parentcome_507=20494 if key=="uuid:c81a0bf4-99a1-4323-b1eb-9d3b39a2fb8e"
replace parentcome_507=20516 if key=="uuid:f8c744e1-2768-4fce-b811-5c2f0658f6e8"
replace parentcome_507=20488 if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"
replace parentcome_507=20332 if key=="uuid:bb35e662-6d9e-4582-b67d-72a77edf4b2c"
replace parentcome_507=20514 if key=="uuid:241921c1-9628-4e2c-a652-49338ec1c09d"
replace parentcome_507=20514 if key=="uuid:d9c5494e-9b1e-48df-97a3-41db8f95a04d"
replace parentcome_507=20487 if key=="uuid:fac78d8a-65bd-497f-a10b-77c24b5bab1c"
replace parentcome_507=20090 if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
replace rememb_date_507=1 if key=="uuid:6ac5859a-3809-4c6f-a56d-b24db2ac697c"
replace parentcome_507=20513 if key=="uuid:6ac5859a-3809-4c6f-a56d-b24db2ac697c"
replace rememb_date_507=1 if key=="uuid:5c7fe1ea-4f67-41fc-be65-aacbca0dd474"
replace parentcome_507=20503 if key=="uuid:5c7fe1ea-4f67-41fc-be65-aacbca0dd474"
replace rememb_date_507=1 if key=="uuid:52a8675c-6991-424a-8a7e-d1945be120b5"
replace parentcome_507=20487 if key=="uuid:52a8675c-6991-424a-8a7e-d1945be120b5"
replace rememb_date_507=1 if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
replace parentcome_507=20332 if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
replace rememb_date_507=1 if key=="uuid:b13d8be3-a73e-4d07-9d48-70d28e6719b8"
replace parentcome_507=20515 if key=="uuid:b13d8be3-a73e-4d07-9d48-70d28e6719b8"
replace rememb_date_507=-99 if key=="uuid:82c7e83f-9e0c-411e-8708-e8fb808bd078"
replace rememb_date_507=-99 if key=="uuid:2913510c-aa1d-4930-ad6e-f07cb938d4c4"
replace parentcome_507=20487 if key=="uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100"
replace parentcome_507=20332 if key=="uuid:b918e507-e35d-4a29-9ee4-8abb5e0b0894"
replace parentcome_507=20332 if key=="uuid:f411387a-84fb-4940-a7f6-60762ef86511"

*br nonteach_505 reguparent_506 rememb_date_507 parentcome_507 if key=="uuid:b918e507-e35d-4a29-9ee4-8abb5e0b0894" |key=="uuid:f411387a-84fb-4940-a7f6-60762ef86511"

/*    
Previously indicated:
*replace parentcome_507=29022016 if key=="uuid:fb7bc230-3cfa-4af8-a445-03ffc329e3f6"
*replace parentcome_507=24022016 if key=="uuid:ded79d66-82f7-4281-be9f-ac17274d8a32"
*replace parentcome_507=03022016 if key=="uuid:3934da24-721f-4c78-9ec8-18bcb7309e4a"
*replace parentcome_507=03022016 if key=="uuid:890be4eb-d56d-4536-96c8-83708ba93b5b"
*replace parentcome_507=03022016 if key=="uuid:4d7c7114-dfba-409c-8547-a5d2567e0969"
*replace parentcome_507=03022016 if key=="uuid:f7d8b31e-c10c-47ad-9810-4e24ed640c7d"
*replace parentcome_507=03032016 if key=="uuid:b574f054-ae19-4db9-8642-04374ac8ed86"
*replace parentcome_507=10022016 if key=="uuid:c81a0bf4-99a1-4323-b1eb-9d3b39a2fb8e"
*replace parentcome_507=04032016 if key=="uuid:f8c744e1-2768-4fce-b811-5c2f0658f6e8"
*replace parentcome_507=04022016 if key=="uuid:0969d556-d1b8-4633-bab3-e63af2a80a91"
*replace parentcome_507=01092015 if key=="uuid:bb35e662-6d9e-4582-b67d-72a77edf4b2c"
*replace parentcome_507=01032016 if key=="uuid:241921c1-9628-4e2c-a652-49338ec1c09d"
*replace parentcome_507=01032016 if key=="uuid:d9c5494e-9b1e-48df-97a3-41db8f95a04d"
*replace parentcome_507=03022016 if key=="uuid:fac78d8a-65bd-497f-a10b-77c24b5bab1c"
*replace parentcome_507=02012016 if key=="uuid:94ba6ace-2085-44ce-8abb-dbf3425c62cc"
*replace parentcome_507=20022016 if key=="uuid:6ac5859a-3809-4c6f-a56d-b24db2ac697c"
*replace rememb_date_507=-99 if key=="uuid:82c7e83f-9e0c-411e-8708-e8fb808bd078"
*replace rememb_date_507=-99 if key=="uuid:2913510c-aa1d-4930-ad6e-f07cb938d4c4"
*replace rememb_date_507=1 if key=="uuid:6ac5859a-3809-4c6f-a56d-b24db2ac697c"
*replace rememb_date_507=1 if key=="uuid:5c7fe1ea-4f67-41fc-be65-aacbca0dd474"
*replace parentcome_507=19022016 if key=="uuid:5c7fe1ea-4f67-41fc-be65-aacbca0dd474"
*replace parentcome_507=03022016 if key=="uuid:52a8675c-6991-424a-8a7e-d1945be120b5"
*replace rememb_date_507=1 if key=="uuid:52a8675c-6991-424a-8a7e-d1945be120b5"
*replace parentcome_507=01092015 if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
*replace rememb_date_507=1 if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
*replace rememb_date_507=1 if key=="uuid:b13d8be3-a73e-4d07-9d48-70d28e6719b8"
*replace parentcome_507=02032016 if key=="uuid:b13d8be3-a73e-4d07-9d48-70d28e6719b8"
*replace parentcome_507=0302016 if key==""uuid:503c1af8-8e2c-4c5a-b604-ed06bf294100

*/

      *508 Discussion topic
	  
replace topic_508="" if key=="uuid:c9753657-eb30-4b37-84f3-f299ce3dcc6b"
replace topic_508="2" if key=="uuid:84c9b20c-0536-4deb-9af8-74eb260af98e"
replace topic_508="." if key=="uuid:93c9b2c9-81ff-456e-9283-e40640548d46"
replace topic_508="." if key=="uuid:8b612907-7f68-4731-84f7-7babb15e58cf"
replace topic_508="1" if key=="uuid:d043f0eb-7511-44af-bc82-7801817534e8"
replace topic_508="." if key=="uuid:1d39600c-54bf-471f-be2b-034f559820fb"
replace topic_508="." if key=="uuid:2d0a8c36-4d53-465e-a5a9-8a99830ac8f7"
replace topic_508="2" if key=="uuid:8e130d16-8f38-4d3d-a09e-7a0359786068"
replace topic_508="." if key=="uuid:1f6538dc-71cd-4684-92cb-3ce62199e0c4"
replace topic_508="1" if key=="uuid:6ac5859a-3809-4c6f-a56d-b24db2ac697c"
replace topic_508="." if key=="uuid:c520e356-5190-431e-8bf8-d10286108053"
replace topic_508="." if key=="uuid:599ed820-3a41-42cd-8d81-200eee9cd6ed"
replace topic_508="1" if key=="uuid:3861b74a-1dca-415d-a542-a3f4a8d4dcb5"
replace topic_508="." if key=="uuid:8599f2d0-b681-45c4-890e-32d07644db81"
replace topic_508="1" if key=="uuid:f2e8770a-f488-433a-bd57-5dddb3f8b00e"
replace topic_508="." if key=="uuid:4ae71431-1c63-42e5-b31d-513bc11fb27d"
replace topic_508="3" if key=="uuid:5c7fe1ea-4f67-41fc-be65-aacbca0dd474"
replace topic_508="." if key=="uuid:b55b68b8-4e60-4ec7-b042-f8ed70161a34"
replace topic_508="3" if key=="uuid:3934da24-721f-4c78-9ec8-18bcb7309e4a"
replace topic_508="." if key=="uuid:0051f991-17cb-4c3b-b03a-38ea85650a85"
replace topic_508="." if key=="uuid:14a233cd-de58-4fce-a84b-7af388aa595d"
replace topic_508="." if key=="uuid:a10b71c2-6ed5-48e7-9306-52625f8c7f0e"
replace topic_508="." if key=="uuid:4e5f9443-2cae-4995-ae51-308ef1df4f74"
replace topic_508="." if key=="uuid:f59298f9-6510-41df-8f2d-a6e3bdfb3611"
replace topic_508="2" if key=="uuid:8d884232-390e-472c-aa18-9ffd71b19fc6"
replace topic_508="2" if key=="uuid:3e67d431-2ea3-4b1e-87ee-0747c6d420fc"
replace topic_508="1" if key=="uuid:b13d8be3-a73e-4d07-9d48-70d28e6719b8"
replace topic_508="." if key=="uuid:11b810b2-7633-40ae-b851-ea40b37a8383"
replace topic_508="." if key=="uuid:af30d5c8-bf84-400a-98a3-b828347849b8"
replace topic_508="." if key=="uuid:0caa8808-0167-4b2b-b9a8-f3910ee71eed"
replace topic_508="." if key=="uuid:d61fa246-a24f-449c-bf7f-d6798ddb1311"
replace topic_508="1" if key=="uuid:52a8675c-6991-424a-8a7e-d1945be120b5"
replace topic_508="." if key=="uuid:9f214da2-771c-4ef8-9ffd-27f8dfbcfccc"
replace topic_508="2" if key=="uuid:549ef632-98c0-4b1e-ac47-5e0940270109"
replace topic_508="." if key=="uuid:7c6a4770-9865-4d11-969c-f86aca82a71a"
replace topic_508="." if key=="uuid:b9864580-4d1e-41fa-9889-4347bff583ca"
replace topic_508="." if key=="uuid:028c65a0-228a-418e-a1bf-95d4c87a8763"
replace topic_508="." if key=="uuid:e812903d-3027-49d1-be5c-aa19201a8d5b"
replace topic_508="-66" if key=="uuid:c93948d5-e360-4413-b0a9-ea9b5e58c3da"
replace topic_508_other="school feeding" if key=="uuid:c93948d5-e360-4413-b0a9-ea9b5e58c3da"
replace topic_508="2" if key=="uuid:82c7e83f-9e0c-411e-8708-e8fb808bd078"
replace topic_508="." if key=="uuid:2913510c-aa1d-4930-ad6e-f07cb938d4c4"
replace topic_508="-66" if key=="uuid:7234f537-7d82-4398-b11a-7805fd3a929d"

destring topic_508, replace 
#delimit ;
label define topic_508lab
1 "Discipline"
2 "Performance/ test"
3 "Routine information"
4 "Absenteeism/ sickness"
-66 "Other";
#delimit cr

label val topic_508 topic_508lab

* SECTION 6. TEACHER INCOME & JOB SATISFACTION
	*600
/*sum #Check
Checked by JB!
list district school othoccup_600 hrsothoccup_601 monthinc_602 if monthinc_602==-55
replace othoccup_600=0 if othoccup_600==1 & hrsothoccup_601==.
replace othoccup_600=1 if othoccup_600==0 & monthinc_602==-55
*/
replace othoccup_600=0 if key=="uuid:f4b94c4d-95b6-4fe7-bd20-31f1468a192b"
replace othoccup_600=0 if key=="uuid:d043f0eb-7511-44af-bc82-7801817534e8"
replace hrsothoccup_601=. if key=="uuid:c835b976-1fd3-448e-a51e-e97cdaa01722"

    *601
replace hrsothoccup_601=. if key=="uuid:f4b94c4d-95b6-4fe7-bd20-31f1468a192b"
replace hrsothoccup_601=. if key=="uuid:d043f0eb-7511-44af-bc82-7801817534e8"
replace hrsothoccup_601=. if key=="uuid:c835b976-1fd3-448e-a51e-e97cdaa01722"

	*602

gsort -othoccup_600
replace monthinc_602=. if key=="uuid:f4b94c4d-95b6-4fe7-bd20-31f1468a192b"
replace monthinc_602=. if key=="uuid:d043f0eb-7511-44af-bc82-7801817534e8"
replace monthinc_602=. if key=="uuid:c835b976-1fd3-448e-a51e-e97cdaa01722"

	
	*603
replace aftclass_603=. if key=="uuid:c5987cd3-2cfc-43c7-8f5d-25fce77396da"

*There was "no answer (-55)" to point9_606. Looking at point1-8, the code 3 was given to point9
replace point9_606=3 if key=="uuid:5da2457a-23dd-4e5e-bb11-0cdccc1b7861"
replace point9_606=3 if key=="uuid:599ed820-3a41-42cd-8d81-200eee9cd6ed"
replace point9_606=3 if key=="uuid:41701546-3455-4524-b8b1-8645a5e34345"
replace point5_606=4 if key=="uuid:5885d12a-9217-4ba9-b0e6-3a7c23367d7f"
replace point9_606=3 if key=="uuid:c63e401c-1eba-4ca4-850f-5de40befb0ef"
replace point9_606=4 if key=="uuid:24dd1097-9fbb-4b82-9086-d215c442c6f3"
replace point9_606=3 if key=="uuid:9dce7ea6-e0a7-4cb4-b612-d30b4984489d"
replace point9_606=2 if key=="uuid:dfe174b8-491d-4537-902f-1c51138b281f"
replace point6_606=3 if key=="uuid:0ddd9118-9608-41f7-8d87-c5ca4fdda487"
replace point8_606=3 if key=="uuid:cd600a6f-84d8-416b-a86c-bceed4e46ff5"
replace aftclass_603=0 if aftclass_603==.


	// Final cleaning
	
drop dup uniqueid m7_218a my_209 come_507 my_date entry 
order yreduc_218, after(train_217_other)
order attended_219 yreduc_219, after(yreduc_218)
order rememb_date_227 staffmeet_227, after(schcode_226)
order rememb_date_507 parentcome_507, after(reguparent_506)
order deviceid interview_starttime, after(endtime)
order district_str, after(district_101)
order yrbeginteach_206 yrteachhere_207, after(contr_205_other)
order interview_date_116, before(teach_entr_117)
order interview_starttime, before(interview_endtime)
lab var starttime "Data entry starttime"
lab var endtime "Data entry endtime"



	// Save with PIIS in encrypted location
cd "[directory]"
save Teacher_Survey_cleaned, replace
	
	// Save Without PI
cd "$clean_dir"	
		*Deidentification
		
local Piis first_name_109 family_name_109 phone_pers_1_110 phone_pers_2_110 phone_pers_3_110
foreach var of local Piis{
replace `var'="deidentified"
}


save Teacher_Survey_cleaned_NOPII,replace
saveold Teacher_Survey_cleaned_NOPIIv12, version(12) replace
export excel "Teacher_Survey_cleaned_NOPIIv12.csv", replace
codebookout "Codebook_Master_Teacher.xls",replace



















